]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't display redundant 'see' in info-mode
authorRobert Pluim <rpluim@gmail.com>
Thu, 25 Nov 2021 14:55:40 +0000 (15:55 +0100)
committerRobert Pluim <rpluim@gmail.com>
Thu, 25 Nov 2021 17:12:39 +0000 (18:12 +0100)
* 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

index cd4c867f4e639bd88d783a38c4e041e19234f4aa..94537c2417ab0b2626f2226a638004a2a550199b 100644 (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)))
                               "")