# HG changeset patch # User Roland McGrath # Date 772834903 0 # Node ID 6099d3d43685b6cdaaf1c02f24c953e728f4f314 # Parent fa224a1d7aa1d855d2fd6359e933f515a8ebaac0 (tag-exact-match-p): Test for point sitting after the explicit tag name itself. diff -r fa224a1d7aa1 -r 6099d3d43685 lisp/progmodes/etags.el --- a/lisp/progmodes/etags.el Tue Jun 28 19:17:25 1994 +0000 +++ b/lisp/progmodes/etags.el Tue Jun 28 20:21:43 1994 +0000 @@ -1149,7 +1149,10 @@ ;; 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")