# HG changeset patch # User Roland McGrath # Date 711676836 0 # Node ID b7ba8d69e13664df3dbb0e59a2577b5b432491f0 # Parent 746ebe6cc4c8a4d56046bd17cffe5a4e73f5b769 *** empty log message *** diff -r 746ebe6cc4c8 -r b7ba8d69e136 lisp/progmodes/etags.el --- 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