From 3dcb629f6ac227eb0f9ca46203035b16bf387911 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Thu, 25 Nov 2021 15:55:40 +0100 Subject: [PATCH] Don't display redundant 'see' in info-mode * lisp/info.el (Info-fontify-node): Don't show 'see' when displaying the result of "(See @ref" or "also @ref", but leave "Also @ref" alone. --- lisp/info.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/info.el b/lisp/info.el index cd4c867f4e6..94537c2417a 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4896,9 +4896,16 @@ first line or header line, and for breadcrumb links.") ;; an end of sentence (skip-syntax-backward " (")) (setq other-tag - (cond ((save-match-data (looking-back "\\(^\\| \\)see" + (cond ((save-match-data (looking-back "\\(^\\|[ (]\\)see" (- (point) 4))) "") + ;; We want "Also *note" to produce + ;; "Also see", but "See also *note" to produce + ;; "See also", so match case-sensitively. + ((save-match-data (let ((case-fold-search nil)) + (looking-back "\\(^\\| \\)also" + (- (point) 5)))) + "") ((save-match-data (looking-back "\\(^\\| \\)in" (- (point) 3))) "") -- 2.39.5