aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-12-25 01:11:47 +0000
committerRichard M. Stallman1997-12-25 01:11:47 +0000
commit99783bde1243b07e22ff4a9ab03dd984ace15c2c (patch)
tree9bb139084a97e54c1f79c4464d3d724fb683fe1e
parent177c35491906f544c51efdc54ca6c4d8d7e3cd39 (diff)
downloademacs-99783bde1243b07e22ff4a9ab03dd984ace15c2c.tar.gz
emacs-99783bde1243b07e22ff4a9ab03dd984ace15c2c.zip
Customized.
(tags-revert-without-query): New option. (tags-verify-table): Test tags-revert-without-query.
-rw-r--r--lisp/progmodes/etags.el35
1 files changed, 27 insertions, 8 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index a16cc974986..3b5a9d6d7b6 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -34,21 +34,35 @@ Use the `etags' program to make a tags table file.")
34;; Make M-x set-variable tags-file-name like M-x visit-tags-table. 34;; Make M-x set-variable tags-file-name like M-x visit-tags-table.
35;;;###autoload (put 'tags-file-name 'variable-interactive "fVisit tags table: ") 35;;;###autoload (put 'tags-file-name 'variable-interactive "fVisit tags table: ")
36 36
37(defgroup etags "Tags tables"
38 :group 'tools)
39
37;;;###autoload 40;;;###autoload
38;; Use `visit-tags-table-buffer' to cycle through tags tables in this list. 41;; Use `visit-tags-table-buffer' to cycle through tags tables in this list.
39(defvar tags-table-list nil 42(defcustom tags-table-list nil
40 "*List of file names of tags tables to search. 43 "*List of file names of tags tables to search.
41An element that is a directory means the file \"TAGS\" in that directory. 44An element that is a directory means the file \"TAGS\" in that directory.
42To switch to a new list of tags tables, setting this variable is sufficient. 45To switch to a new list of tags tables, setting this variable is sufficient.
43If you set this variable, do not also set `tags-file-name'. 46If you set this variable, do not also set `tags-file-name'.
44Use the `etags' program to make a tags table file.") 47Use the `etags' program to make a tags table file."
48 :group 'etags
49 :type '(repeat file))
45 50
46;;;###autoload 51;;;###autoload
47(defvar tags-add-tables 'ask-user 52(defcustom tags-add-tables 'ask-user
48 "*Control whether to add a new tags table to the current list. 53 "*Control whether to add a new tags table to the current list.
49t means do; nil means don't (always start a new list). 54t means do; nil means don't (always start a new list).
50Any other value means ask the user whether to add a new tags table 55Any other value means ask the user whether to add a new tags table
51to the current list (as opposed to starting a new list).") 56to the current list (as opposed to starting a new list)."
57 :group 'etags
58 :type '(choice (const :tag "Do" t)
59 (const :tag "Don't" nil)
60 (const :tag "Ask" ask-user)))
61
62(defcustom tags-revert-without-query nil
63 "*Non-nil means reread a TAGS table without querying, if it has changed."
64 :group 'etags
65 :type 'boolean)
52 66
53(defvar tags-table-computed-list nil 67(defvar tags-table-computed-list nil
54 "List of tags tables to search, computed from `tags-table-list'. 68 "List of tags tables to search, computed from `tags-table-list'.
@@ -76,17 +90,21 @@ Use `visit-tags-table-buffer' to cycle through tags tables in this list.")
76Each element is a list of strings which are file names.") 90Each element is a list of strings which are file names.")
77 91
78;;;###autoload 92;;;###autoload
79(defvar find-tag-hook nil 93(defcustom find-tag-hook nil
80 "*Hook to be run by \\[find-tag] after finding a tag. See `run-hooks'. 94 "*Hook to be run by \\[find-tag] after finding a tag. See `run-hooks'.
81The value in the buffer in which \\[find-tag] is done is used, 95The value in the buffer in which \\[find-tag] is done is used,
82not the value in the buffer \\[find-tag] goes to.") 96not the value in the buffer \\[find-tag] goes to."
97 :group 'etags
98 :type 'hook)
83 99
84;;;###autoload 100;;;###autoload
85(defvar find-tag-default-function nil 101(defcustom find-tag-default-function nil
86 "*A function of no arguments used by \\[find-tag] to pick a default tag. 102 "*A function of no arguments used by \\[find-tag] to pick a default tag.
87If nil, and the symbol that is the value of `major-mode' 103If nil, and the symbol that is the value of `major-mode'
88has a `find-tag-default-function' property (see `put'), that is used. 104has a `find-tag-default-function' property (see `put'), that is used.
89Otherwise, `find-tag-default' is used.") 105Otherwise, `find-tag-default' is used."
106 :group 'etags
107 :type 'function)
90 108
91(defvar default-tags-table-function nil 109(defvar default-tags-table-function nil
92 "If non-nil, a function to choose a default tags file for a buffer. 110 "If non-nil, a function to choose a default tags file for a buffer.
@@ -323,6 +341,7 @@ Returns non-nil iff it is a valid table."
323 (setq found t)) 341 (setq found t))
324 (setq tail (cdr tail))) 342 (setq tail (cdr tail)))
325 found) 343 found)
344 tags-revert-without-query
326 (yes-or-no-p 345 (yes-or-no-p
327 (format "Tags file %s has changed, read new contents? " 346 (format "Tags file %s has changed, read new contents? "
328 file))))) 347 file)))))