summaryrefslogtreecommitdiff
path: root/lisp/info.el
diff options
context:
space:
mode:
authorRobert Pluim <rpluim@gmail.com>2021-11-25 15:55:40 +0100
committerRobert Pluim <rpluim@gmail.com>2021-11-25 18:12:39 +0100
commit3dcb629f6ac227eb0f9ca46203035b16bf387911 (patch)
treeecb98e1fad1c3b963e18252fbc431fe857b36c39 /lisp/info.el
parent223c956fc6568864440fd5bc70b7f4321e0c0fb2 (diff)
downloademacs-3dcb629f6ac227eb0f9ca46203035b16bf387911.tar.gz
emacs-3dcb629f6ac227eb0f9ca46203035b16bf387911.tar.bz2
emacs-3dcb629f6ac227eb0f9ca46203035b16bf387911.zip
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.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el9
1 files changed, 8 insertions, 1 deletions
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)))
"")