[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3dcb629 1/3: Don't display redundant 'see' in info-mode
From: |
Robert Pluim |
Subject: |
master 3dcb629 1/3: Don't display redundant 'see' in info-mode |
Date: |
Thu, 25 Nov 2021 12:12:53 -0500 (EST) |
branch: master
commit 3dcb629f6ac227eb0f9ca46203035b16bf387911
Author: Robert Pluim <rpluim@gmail.com>
Commit: Robert Pluim <rpluim@gmail.com>
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 cd4c867..94537c2 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)))
"")