aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2015-04-30 01:55:43 +0300
committerDmitry Gutov2015-04-30 01:55:43 +0300
commit768edb6e7b8e69443f56af7ec4ce056f88a404df (patch)
tree48cfdeb9e7cdb14f962a69d1e12bbc13cad3f535
parent3c3eb1d5f2f56bc8e49ae40881a543fbddf8f312 (diff)
downloademacs-768edb6e7b8e69443f56af7ec4ce056f88a404df.tar.gz
emacs-768edb6e7b8e69443f56af7ec4ce056f88a404df.zip
Introduce etags-xref-find-definitions-tag-order
* lisp/progmodes/etags.el (etags-xref-find-definitions-tag-order): New variable. (etags--xref-find-definitions): Use it (bug#19468).
-rw-r--r--lisp/progmodes/etags.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index b470352f8dc..b4ce8b11c9c 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -2073,6 +2073,11 @@ for \\[find-tag] (which see)."
2073;; we hit the limit rarely. 2073;; we hit the limit rarely.
2074(defconst etags--xref-limit 1000) 2074(defconst etags--xref-limit 1000)
2075 2075
2076(defvar etags-xref-find-definitions-tag-order '(tag-exact-match-p
2077 tag-implicit-name-match-p
2078 tag-symbol-match-p)
2079 "Tag order used in `etags-xref-find' to look for definitions.")
2080
2076;;;###autoload 2081;;;###autoload
2077(defun etags-xref-find (action id) 2082(defun etags-xref-find (action id)
2078 (pcase action 2083 (pcase action
@@ -2094,7 +2099,7 @@ for \\[find-tag] (which see)."
2094 (while (visit-tags-table-buffer (not first-time)) 2099 (while (visit-tags-table-buffer (not first-time))
2095 (setq first-time nil) 2100 (setq first-time nil)
2096 (dolist (order-fun (cond (regexp? find-tag-regexp-tag-order) 2101 (dolist (order-fun (cond (regexp? find-tag-regexp-tag-order)
2097 (t find-tag-tag-order))) 2102 (t etags-xref-find-definitions-tag-order)))
2098 (goto-char (point-min)) 2103 (goto-char (point-min))
2099 (while (and (funcall search-fun pattern nil t) 2104 (while (and (funcall search-fun pattern nil t)
2100 (< (hash-table-count marks) etags--xref-limit)) 2105 (< (hash-table-count marks) etags--xref-limit))