aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath1994-06-28 20:21:43 +0000
committerRoland McGrath1994-06-28 20:21:43 +0000
commit63aeffd5a02f56220b61a4ccc0d9a26e01e11a03 (patch)
tree210bb72b833a8ffd5b23805fe754c43439748c0b
parent1d8f6c8cae9458b02d524c6891cfd1b5202bf8c6 (diff)
downloademacs-63aeffd5a02f56220b61a4ccc0d9a26e01e11a03.tar.gz
emacs-63aeffd5a02f56220b61a4ccc0d9a26e01e11a03.zip
(tag-exact-match-p): Test for point sitting after the explicit tag name
itself.
-rw-r--r--lisp/progmodes/etags.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 79134b09016..808918ce9cd 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1149,7 +1149,10 @@ See documentation of variable `tags-file-name'."
1149;; point should be just after a string that matches TAG. 1149;; point should be just after a string that matches TAG.
1150(defun tag-exact-match-p (tag) 1150(defun tag-exact-match-p (tag)
1151 ;; The match is really exact if there is an explicit tag name. 1151 ;; The match is really exact if there is an explicit tag name.
1152 (or (looking-at (concat "[^\177\n]*\177" (regexp-quote tag) "\001")) 1152 (or (and (eq (char-after (point)) ?\001)
1153 (eq (char-after (- (point) (length tag)) ?\177)))
1154 ;; We are not on the explicit tag name, but perhaps it follows.
1155 (looking-at (concat "[^\177\n]*\177" (regexp-quote tag) "\001"))
1153 ;; We also call it "exact" if it is surrounded by symbol boundaries. 1156 ;; We also call it "exact" if it is surrounded by symbol boundaries.
1154 ;; This is needed because etags does not always generate explicit names. 1157 ;; This is needed because etags does not always generate explicit names.
1155 (and (looking-at "\\Sw.*\177") (looking-at "\\S_.*\177") 1158 (and (looking-at "\\Sw.*\177") (looking-at "\\S_.*\177")