Mercurial > emacs
changeset 824:b7ba8d69e136
*** empty log message ***
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Tue, 21 Jul 1992 00:00:36 +0000 |
parents | 746ebe6cc4c8 |
children | f3eb45ffe06d |
files | lisp/progmodes/etags.el |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/etags.el Mon Jul 20 22:30:14 1992 +0000 +++ b/lisp/progmodes/etags.el Tue Jul 21 00:00:36 1992 +0000 @@ -29,6 +29,7 @@ *File name of tags table. To switch to a new tags table, setting this variable is sufficient. Use the `etags' program to make a tags table file.") +;;;###autoload (put 'tags-file-name 'variable-interactive "fVisit tags table: ") ;;;###autoload (defvar tags-table-list nil @@ -89,8 +90,7 @@ ;; Hooks for file formats. (defvar tags-table-format-hooks '(etags-recognize-tags-table - recognize-empty-tags-table - ctags-recognize-tags-table) + recognize-empty-tags-table) "List of functions to be called in a tags table buffer to identify the type of tags table. The functions are called in order, with no arguments, until one returns non-nil. The function should make buffer-local bindings @@ -164,7 +164,6 @@ default-directory) t) current-prefix-arg)) - (setq file (abbreviate-file-name (expand-file-name file))) (if (file-directory-p file) (setq file (expand-file-name "TAGS" file))) (if local @@ -260,6 +259,13 @@ (revert-buffer t t) (initialize-new-tags-table))) (set-buffer (find-file-noselect file)) + (or (string= file buffer-file-name) + ;; find-file-noselect has changed the file name. + ;; Propagate the change to tags-file-name and tags-table-list. + (let ((tail (assoc file tags-table-list))) + (if tail + (setcar tail buffer-file-name)) + (setq tags-file-name buffer-file-name))) (initialize-new-tags-table)) (if (and put-in-list