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.
This commit is contained in:
Robert Pluim 2021-11-25 15:55:40 +01:00
parent 223c956fc6
commit 3dcb629f6a

View file

@ -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)))
"")