aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2002-11-01 08:53:50 +0000
committerKim F. Storm2002-11-01 08:53:50 +0000
commita9efebd0ba18c0fe8b6ce81302bf29d327503506 (patch)
tree887da23a9dfad75468360081cde1bd01ce60548b
parentbecf65839bc6de9945f41e0ba31641ac0149a113 (diff)
downloademacs-a9efebd0ba18c0fe8b6ce81302bf29d327503506.tar.gz
emacs-a9efebd0ba18c0fe8b6ce81302bf29d327503506.zip
(Info-hide-note-references): New defcustom.
(Info-fontify-node): Use it.
-rw-r--r--lisp/info.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 0dd5793828b..46967732fe8 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -145,6 +145,11 @@ when you hit the end of the current node."
145 :type 'boolean 145 :type 'boolean
146 :group 'info) 146 :group 'info)
147 147
148(defcustom Info-hide-note-references t
149 "*If non-nil, hide the section reference in *note and * menu items."
150 :type 'boolean
151 :group 'info)
152
148(defcustom Info-mode-hook '(turn-on-font-lock) 153(defcustom Info-mode-hook '(turn-on-font-lock)
149 "Hooks run when `info-mode' is called." 154 "Hooks run when `info-mode' is called."
150 :type 'hook 155 :type 'hook
@@ -2744,8 +2749,9 @@ the variable `Info-file-list-for-emacs'."
2744 '(font-lock-face info-xref 2749 '(font-lock-face info-xref
2745 mouse-face highlight 2750 mouse-face highlight
2746 help-echo "mouse-2: go to this node")) 2751 help-echo "mouse-2: go to this node"))
2747 (add-text-properties (match-beginning 3) (match-end 3) 2752 (if Info-hide-note-references
2748 '(invisible t intangible t))))) 2753 (add-text-properties (match-beginning 3) (match-end 3)
2754 '(invisible t intangible t))))))
2749 2755
2750 (goto-char (point-min)) 2756 (goto-char (point-min))
2751 (if (and (search-forward "\n* Menu:" nil t) 2757 (if (and (search-forward "\n* Menu:" nil t)
@@ -2763,10 +2769,11 @@ the variable `Info-file-list-for-emacs'."
2763 '(font-lock-face info-xref 2769 '(font-lock-face info-xref
2764 mouse-face highlight 2770 mouse-face highlight
2765 help-echo "mouse-2: go to this node")) 2771 help-echo "mouse-2: go to this node"))
2766 (add-text-properties (match-beginning 2) (match-end 2) 2772 (if Info-hide-note-references
2767 (list 'display 2773 (add-text-properties (match-beginning 2) (match-end 2)
2768 (make-string (max 2 (- 22 (- (match-end 1) (match-beginning 1)))) ? ) 2774 (list 'display
2769 'intangible t))))) 2775 (make-string (max 2 (- 22 (- (match-end 1) (match-beginning 1)))) ? )
2776 'intangible t))))))
2770 2777
2771 (Info-fontify-menu-headers) 2778 (Info-fontify-menu-headers)
2772 (set-buffer-modified-p nil))))) 2779 (set-buffer-modified-p nil)))))