From 63aeffd5a02f56220b61a4ccc0d9a26e01e11a03 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 Jun 1994 20:21:43 +0000 Subject: [PATCH] (tag-exact-match-p): Test for point sitting after the explicit tag name itself. --- lisp/progmodes/etags.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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'." ;; point should be just after a string that matches TAG. (defun tag-exact-match-p (tag) ;; The match is really exact if there is an explicit tag name. - (or (looking-at (concat "[^\177\n]*\177" (regexp-quote tag) "\001")) + (or (and (eq (char-after (point)) ?\001) + (eq (char-after (- (point) (length tag)) ?\177))) + ;; We are not on the explicit tag name, but perhaps it follows. + (looking-at (concat "[^\177\n]*\177" (regexp-quote tag) "\001")) ;; We also call it "exact" if it is surrounded by symbol boundaries. ;; This is needed because etags does not always generate explicit names. (and (looking-at "\\Sw.*\177") (looking-at "\\S_.*\177") -- 2.39.5