aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1991-07-28 13:34:25 +0000
committerJim Blandy1991-07-28 13:34:25 +0000
commitc086701a048682402acf6952e09aabcfe340e388 (patch)
tree839ba9e61a541a3cbe90acddf32eaba83bb62000
parentf0a8a3f19809587d848a1e01391af0d3e8791d92 (diff)
downloademacs-c086701a048682402acf6952e09aabcfe340e388.tar.gz
emacs-c086701a048682402acf6952e09aabcfe340e388.zip
*** empty log message ***
-rw-r--r--lisp/progmodes/etags.el25
1 files changed, 24 insertions, 1 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 7f726a18174..cdad48a4701 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -18,7 +18,13 @@
18;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 19
20 20
21(provide 'tags) 21(provide 'etags)
22
23;;;###autoload
24(defvar tags-file-name nil "\
25*File name of tag table.
26To switch to a new tag table, setting this variable is sufficient.
27Use the `etags' program to make a tag table file.")
22 28
23(defvar tag-table-files nil 29(defvar tag-table-files nil
24 "List of file names covered by current tag table. 30 "List of file names covered by current tag table.
@@ -27,6 +33,7 @@ nil means it has not been computed yet; do (tag-table-files) to compute it.")
27(defvar last-tag nil 33(defvar last-tag nil
28 "Tag found by the last find-tag.") 34 "Tag found by the last find-tag.")
29 35
36;;;###autoload
30(defun visit-tags-table (file) 37(defun visit-tags-table (file)
31 "Tell tags commands to use tag table file FILE. 38 "Tell tags commands to use tag table file FILE.
32FILE should be the name of a file created with the `etags' program. 39FILE should be the name of a file created with the `etags' program.
@@ -78,6 +85,7 @@ File name returned is relative to tag table file's directory."
78 (buffer-substring (point) 85 (buffer-substring (point)
79 (progn (beginning-of-line) (point)))))) 86 (progn (beginning-of-line) (point))))))
80 87
88;;;###autoload
81(defun tag-table-files () 89(defun tag-table-files ()
82 "Return a list of files in the current tag table. 90 "Return a list of files in the current tag table.
83File names returned are absolute." 91File names returned are absolute."
@@ -128,6 +136,7 @@ File names returned are absolute."
128 default 136 default
129 spec)))) 137 spec))))
130 138
139;;;###autoload
131(defun find-tag (tagname &optional next other-window) 140(defun find-tag (tagname &optional next other-window)
132 "Find tag (in current tag table) whose name contains TAGNAME. 141 "Find tag (in current tag table) whose name contains TAGNAME.
133 Selects the buffer that the tag is contained in 142 Selects the buffer that the tag is contained in
@@ -186,6 +195,10 @@ See documentation of variable tags-file-name."
186 ;; Return t in case used as the tags-loop-form. 195 ;; Return t in case used as the tags-loop-form.
187 t) 196 t)
188 197
198;;;###autoload
199(define-key esc-map "." 'find-tag)
200
201;;;###autoload
189(defun find-tag-other-window (tagname &optional next) 202(defun find-tag-other-window (tagname &optional next)
190 "Find tag (in current tag table) whose name contains TAGNAME. 203 "Find tag (in current tag table) whose name contains TAGNAME.
191 Selects the buffer that the tag is contained in in another window 204 Selects the buffer that the tag is contained in in another window
@@ -201,10 +214,13 @@ See documentation of variable tags-file-name."
201 '(nil t) 214 '(nil t)
202 (find-tag-tag "Find tag other window: "))) 215 (find-tag-tag "Find tag other window: ")))
203 (find-tag tagname next t)) 216 (find-tag tagname next t))
217;;;###autoload
218(define-key ctl-x-4-map "." 'find-tag-other-window)
204 219
205(defvar next-file-list nil 220(defvar next-file-list nil
206 "List of files for next-file to process.") 221 "List of files for next-file to process.")
207 222
223;;;###autoload
208(defun next-file (&optional initialize) 224(defun next-file (&optional initialize)
209 "Select next file among files in current tag table. 225 "Select next file among files in current tag table.
210Non-nil argument (prefix arg, if interactive) 226Non-nil argument (prefix arg, if interactive)
@@ -221,6 +237,7 @@ initializes to the beginning of the list of files in the tag table."
221 "Form for tags-loop-continue to eval to process one file. 237 "Form for tags-loop-continue to eval to process one file.
222If it returns nil, it is through with one file; move on to next.") 238If it returns nil, it is through with one file; move on to next.")
223 239
240;;;###autoload
224(defun tags-loop-continue (&optional first-time) 241(defun tags-loop-continue (&optional first-time)
225 "Continue last \\[tags-search] or \\[tags-query-replace] command. 242 "Continue last \\[tags-search] or \\[tags-query-replace] command.
226Used noninteractively with non-nil argument 243Used noninteractively with non-nil argument
@@ -233,7 +250,10 @@ to begin such a command. See variable tags-loop-form."
233 (next-file) 250 (next-file)
234 (message "Scanning file %s..." buffer-file-name) 251 (message "Scanning file %s..." buffer-file-name)
235 (goto-char (point-min)))) 252 (goto-char (point-min))))
253;;;###autoload
254(define-key esc-map "," 'tags-loop-continue)
236 255
256;;;###autoload
237(defun tags-search (regexp) 257(defun tags-search (regexp)
238 "Search through all files listed in tag table for match for REGEXP. 258 "Search through all files listed in tag table for match for REGEXP.
239Stops when a match is found. 259Stops when a match is found.
@@ -248,6 +268,7 @@ See documentation of variable tags-file-name."
248 (list 're-search-forward regexp nil t)) 268 (list 're-search-forward regexp nil t))
249 (tags-loop-continue t))) 269 (tags-loop-continue t)))
250 270
271;;;###autoload
251(defun tags-query-replace (from to &optional delimited) 272(defun tags-query-replace (from to &optional delimited)
252 "Query-replace-regexp FROM with TO through all files listed in tag table. 273 "Query-replace-regexp FROM with TO through all files listed in tag table.
253Third arg DELIMITED (prefix arg) means replace only word-delimited matches. 274Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
@@ -263,6 +284,7 @@ See documentation of variable tags-file-name."
263 (not (null delimited)))))) 284 (not (null delimited))))))
264 (tags-loop-continue t)) 285 (tags-loop-continue t))
265 286
287;;;###autoload
266(defun list-tags (string) 288(defun list-tags (string)
267 "Display list of tags in file FILE. 289 "Display list of tags in file FILE.
268FILE should not contain a directory spec 290FILE should not contain a directory spec
@@ -284,6 +306,7 @@ unless it has one in the tag table."
284 (terpri) 306 (terpri)
285 (forward-line 1))))) 307 (forward-line 1)))))
286 308
309;;;###autoload
287(defun tags-apropos (string) 310(defun tags-apropos (string)
288 "Display list of all tags in tag table REGEXP matches." 311 "Display list of all tags in tag table REGEXP matches."
289 (interactive "sTag apropos (regexp): ") 312 (interactive "sTag apropos (regexp): ")