comparison lisp/progmodes/etags.el @ 824:b7ba8d69e136

*** empty log message ***
author Roland McGrath <roland@gnu.org>
date Tue, 21 Jul 1992 00:00:36 +0000
parents 1dd126823b36
children 20674ae6bf52
comparison
equal deleted inserted replaced
823:746ebe6cc4c8 824:b7ba8d69e136
27 ;;;###autoload 27 ;;;###autoload
28 (defvar tags-file-name nil "\ 28 (defvar tags-file-name nil "\
29 *File name of tags table. 29 *File name of tags table.
30 To switch to a new tags table, setting this variable is sufficient. 30 To switch to a new tags table, setting this variable is sufficient.
31 Use the `etags' program to make a tags table file.") 31 Use the `etags' program to make a tags table file.")
32 ;;;###autoload (put 'tags-file-name 'variable-interactive "fVisit tags table: ")
32 33
33 ;;;###autoload 34 ;;;###autoload
34 (defvar tags-table-list nil 35 (defvar tags-table-list nil
35 "*List of names of tags table files which are currently being searched. 36 "*List of names of tags table files which are currently being searched.
36 An element of nil means to look for a file \"TAGS\" in the current directory. 37 An element of nil means to look for a file \"TAGS\" in the current directory.
87 "List of files for \\[next-file] to process.") 88 "List of files for \\[next-file] to process.")
88 89
89 ;; Hooks for file formats. 90 ;; Hooks for file formats.
90 91
91 (defvar tags-table-format-hooks '(etags-recognize-tags-table 92 (defvar tags-table-format-hooks '(etags-recognize-tags-table
92 recognize-empty-tags-table 93 recognize-empty-tags-table)
93 ctags-recognize-tags-table)
94 "List of functions to be called in a tags table buffer to identify 94 "List of functions to be called in a tags table buffer to identify
95 the type of tags table. The functions are called in order, with no arguments, 95 the type of tags table. The functions are called in order, with no arguments,
96 until one returns non-nil. The function should make buffer-local bindings 96 until one returns non-nil. The function should make buffer-local bindings
97 of the format-parsing tags function variables if successful.") 97 of the format-parsing tags function variables if successful.")
98 98
162 default-directory 162 default-directory
163 (expand-file-name "TAGS" 163 (expand-file-name "TAGS"
164 default-directory) 164 default-directory)
165 t) 165 t)
166 current-prefix-arg)) 166 current-prefix-arg))
167 (setq file (abbreviate-file-name (expand-file-name file)))
168 (if (file-directory-p file) 167 (if (file-directory-p file)
169 (setq file (expand-file-name "TAGS" file))) 168 (setq file (expand-file-name "TAGS" file)))
170 (if local 169 (if local
171 (setq tags-file-name file) 170 (setq tags-file-name file)
172 (kill-local-variable 'tags-file-name) 171 (kill-local-variable 'tags-file-name)
258 "Tags file has changed, read new contents? "))) 257 "Tags file has changed, read new contents? ")))
259 (and win (funcall verify-tags-table-function)) 258 (and win (funcall verify-tags-table-function))
260 (revert-buffer t t) 259 (revert-buffer t t)
261 (initialize-new-tags-table))) 260 (initialize-new-tags-table)))
262 (set-buffer (find-file-noselect file)) 261 (set-buffer (find-file-noselect file))
262 (or (string= file buffer-file-name)
263 ;; find-file-noselect has changed the file name.
264 ;; Propagate the change to tags-file-name and tags-table-list.
265 (let ((tail (assoc file tags-table-list)))
266 (if tail
267 (setcar tail buffer-file-name))
268 (setq tags-file-name buffer-file-name)))
263 (initialize-new-tags-table)) 269 (initialize-new-tags-table))
264 270
265 (if (and put-in-list 271 (if (and put-in-list
266 (not (equal file (car tags-table-list-pointer)))) 272 (not (equal file (car tags-table-list-pointer))))
267 (let (elt) 273 (let (elt)