From 5883ceedc85827041d4f1d64fd15f6b7a28d9221 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 27 May 2025 13:50:12 +0300 Subject: [PATCH] Fix exact matching of Ada tags by 'M-.' * lisp/progmodes/etags.el (tag-exact-match-p): Support Ada tags that have "/x" qualifiers appended to them. (Bug#78489) --- 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 42057a3aacb..f14d91504af 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1649,7 +1649,10 @@ Point should be just after a string that matches TAG." (or (and (eq (char-after (point)) ?\001) (eq (char-after (- (point) (length tag) 1)) ?\177)) ;; We are not on the explicit tag name, but perhaps it follows. - (looking-at (concat "[^\177\n]*\177" (regexp-quote tag) "\001")))) + (looking-at (concat "[^\177\n]*\177" + (regexp-quote tag) + ;; The optional "/x" part is for Ada tags. + "\\(/[fpsbtk]\\)?\001")))) ;; t if point is at a tag line that has an implicit name. ;; point should be just after a string that matches TAG.