aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2000-10-08 19:25:30 +0000
committerStefan Monnier2000-10-08 19:25:30 +0000
commit6010664f9cf021c5461713a51ac846f769f480ef (patch)
tree287237441914c410cfee874157c9b998af27866d
parent8f4f02140540c538ed517ddbf6a3db3cf5286852 (diff)
downloademacs-6010664f9cf021c5461713a51ac846f769f480ef.tar.gz
emacs-6010664f9cf021c5461713a51ac846f769f480ef.zip
Docstring fixes.
(initialize-new-tags-table): Use run-hook-with-args-until-success. (find-tag): Use pop-to-buffer if switch-to-buffer failed.
-rw-r--r--lisp/progmodes/etags.el23
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index ecba11bb3e8..b7dff737c34 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -22,6 +22,8 @@
22;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23;; Boston, MA 02111-1307, USA. 23;; Boston, MA 02111-1307, USA.
24 24
25;;; Commentary:
26
25;;; Code: 27;;; Code:
26 28
27(require 'ring) 29(require 'ring)
@@ -81,7 +83,7 @@ to the current list (as opposed to starting a new list)."
81 "List of tags tables to search, computed from `tags-table-list'. 83 "List of tags tables to search, computed from `tags-table-list'.
82This includes tables implicitly included by other tables. The list is not 84This includes tables implicitly included by other tables. The list is not
83always complete: the included tables of a table are not known until that 85always complete: the included tables of a table are not known until that
84table is read into core. An element that is `t' is a placeholder 86table is read into core. An element that is t is a placeholder
85indicating that the preceding element is a table that has not been read 87indicating that the preceding element is a table that has not been read
86into core and might contain included tables to search. 88into core and might contain included tables to search.
87See `tags-table-check-computed-list'.") 89See `tags-table-check-computed-list'.")
@@ -144,7 +146,7 @@ If non-nil, value should be a list of triples (TITLE FUNCTION
144TO-SEARCH). For each triple, `tags-apropos' processes TO-SEARCH and 146TO-SEARCH). For each triple, `tags-apropos' processes TO-SEARCH and
145lists tags from it. TO-SEARCH should be an alist, obarray, or symbol. 147lists tags from it. TO-SEARCH should be an alist, obarray, or symbol.
146If it is a symbol, the symbol's value is used. 148If it is a symbol, the symbol's value is used.
147TITLE. a string, is a title used to label the additional list of tags. 149TITLE, a string, is a title used to label the additional list of tags.
148FUNCTION is a function to call when a symbol is selected in the 150FUNCTION is a function to call when a symbol is selected in the
149*Tags List* buffer. It will be called with one argument SYMBOL which 151*Tags List* buffer. It will be called with one argument SYMBOL which
150is the symbol being selected. 152is the symbol being selected.
@@ -190,7 +192,7 @@ nil means it has not yet been computed; use `tags-table-files' to do so.")
190 192
191(defvar tags-table-format-hooks '(etags-recognize-tags-table 193(defvar tags-table-format-hooks '(etags-recognize-tags-table
192 tags-recognize-empty-tags-table) 194 tags-recognize-empty-tags-table)
193 "List of functions to be called in a tags table buffer to identify the type of tags table. 195 "Hook to be called in a tags table buffer to identify the type of tags table.
194The functions are called in order, with no arguments, 196The functions are called in order, with no arguments,
195until one returns non-nil. The function should make buffer-local bindings 197until one returns non-nil. The function should make buffer-local bindings
196of the format-parsing tags function variables if successful.") 198of the format-parsing tags function variables if successful.")
@@ -200,7 +202,7 @@ of the format-parsing tags function variables if successful.")
200(defvar tags-table-files-function nil 202(defvar tags-table-files-function nil
201 "Function to do the work of `tags-table-files' (which see).") 203 "Function to do the work of `tags-table-files' (which see).")
202(defvar tags-completion-table-function nil 204(defvar tags-completion-table-function nil
203 "Function to build the tags-completion-table.") 205 "Function to build the `tags-completion-table'.")
204(defvar snarf-tag-function nil 206(defvar snarf-tag-function nil
205 "Function to get info about a matched tag for `goto-tag-location-function'.") 207 "Function to get info about a matched tag for `goto-tag-location-function'.")
206(defvar goto-tag-location-function nil 208(defvar goto-tag-location-function nil
@@ -240,11 +242,7 @@ One argument, the tag info returned by `snarf-tag-function'.")
240 ;; are global. 242 ;; are global.
241 243
242 ;; Value is t if we have found a valid tags table buffer. 244 ;; Value is t if we have found a valid tags table buffer.
243 (let ((hooks tags-table-format-hooks)) 245 (run-hook-with-args-until-success 'tags-table-format-hooks))
244 (while (and hooks
245 (not (funcall (car hooks))))
246 (setq hooks (cdr hooks)))
247 hooks))
248 246
249;;;###autoload 247;;;###autoload
250(defun visit-tags-table (file &optional local) 248(defun visit-tags-table (file &optional local)
@@ -886,7 +884,10 @@ Contrast this with the ring of marks gone to by the command.
886 884
887See documentation of variable `tags-file-name'." 885See documentation of variable `tags-file-name'."
888 (interactive (find-tag-interactive "Find tag: ")) 886 (interactive (find-tag-interactive "Find tag: "))
889 (switch-to-buffer (find-tag-noselect tagname next-p regexp-p))) 887 (let ((buf (find-tag-noselect tagname next-p regexp-p)))
888 (condition-case nil
889 (switch-to-buffer buf)
890 (error (pop-to-buffer buf)))))
890;;;###autoload (define-key esc-map "." 'find-tag) 891;;;###autoload (define-key esc-map "." 'find-tag)
891 892
892;;;###autoload 893;;;###autoload
@@ -1629,7 +1630,7 @@ See documentation of variable `tags-file-name'."
1629 1630
1630;;;###autoload 1631;;;###autoload
1631(defun tags-query-replace (from to &optional delimited file-list-form start end) 1632(defun tags-query-replace (from to &optional delimited file-list-form start end)
1632 "Query-replace-regexp FROM with TO through all files listed in tags table. 1633 "`Query-replace-regexp' FROM with TO through all files listed in tags table.
1633Third arg DELIMITED (prefix arg) means replace only word-delimited matches. 1634Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
1634If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace 1635If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace
1635with the command \\[tags-loop-continue]. 1636with the command \\[tags-loop-continue].