Mercurial > emacs
changeset 1397:d469afe703c4
(visit-tags-table-buffer): When trying to pick table, call
tags-expand-table-name on alternatives that might be nil.
(tags-table-files): Don't call visit-tags-table-buffer; assume we are there.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Mon, 12 Oct 1992 17:18:22 +0000 |
parents | 17365cdb1c10 |
children | 70d0cd4c5bff |
files | lisp/progmodes/etags.el |
diffstat | 1 files changed, 14 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/etags.el Mon Oct 12 04:53:11 1992 +0000 +++ b/lisp/progmodes/etags.el Mon Oct 12 17:18:22 1992 +0000 @@ -324,11 +324,14 @@ ;; tags for the current buffer's file. ;; If one is found, the lists will be frobnicated, ;; and CONT will be set non-nil so we don't do it below. - (save-excursion - (car (tags-table-including buffer-file-name - tags-table-list))) - (car tags-table-list) - tags-file-name + (let ((found (save-excursion + (tags-table-including buffer-file-name + tags-table-list)))) + (and found + ;; Expand it so it won't be nil. + (tags-expand-table-name (car found)))) + (tags-expand-table-name (car tags-table-list)) + (tags-expand-table-name tags-file-name) (expand-file-name (read-file-name "Visit tags table: (default TAGS) " default-directory @@ -417,7 +420,7 @@ (kill-local-variable 'tags-file-name) (setq tags-file-name nil) (error "File %s is not a valid tags table" buffer-file-name)))) - + (defun file-of-tag () "Return the file name of the file whose tags point is within. Assumes the tags table is the current buffer. @@ -428,11 +431,9 @@ (defun tags-table-files () "Return a list of files in the current tags table. File names returned are absolute." - (save-excursion - (visit-tags-table-buffer) - (or tags-table-files - (setq tags-table-files - (funcall tags-table-files-function))))) + (or tags-table-files + (setq tags-table-files + (funcall tags-table-files-function)))) (defun tags-included-tables () "Return a list of tags tables included by the current table." @@ -473,7 +474,7 @@ (if (eq what t) (all-completions string (tags-completion-table) predicate) (try-completion string (tags-completion-table) predicate)))) - + ;; Return a default tag to search for, based on the text at point. (defun find-tag-default () (save-excursion @@ -940,6 +941,7 @@ (setq next-file-list (tags-table-files)))) (or next-file-list (save-excursion + ;; Get the files from the next tags table. ;; When doing (visit-tags-table-buffer t), ;; the tags table buffer must be current. (if (and (visit-tags-table-buffer 'same)