comparison lisp/info.el @ 48107:c0a7fff00ce5

(Info-hide-note-references): New defcustom. (Info-fontify-node): Use it.
author Kim F. Storm <storm@cua.dk>
date Fri, 01 Nov 2002 08:53:50 +0000
parents 7d7f2b855580
children 40e2242be50f
comparison
equal deleted inserted replaced
48106:d69a38446204 48107:c0a7fff00ce5
140 that you visit a subnode before getting to the end of the menu. 140 that you visit a subnode before getting to the end of the menu.
141 141
142 Setting this option to nil results in behavior similar to the stand-alone 142 Setting this option to nil results in behavior similar to the stand-alone
143 Info reader program, which visits the first subnode from the menu only 143 Info reader program, which visits the first subnode from the menu only
144 when you hit the end of the current node." 144 when you hit the end of the current node."
145 :type 'boolean
146 :group 'info)
147
148 (defcustom Info-hide-note-references t
149 "*If non-nil, hide the section reference in *note and * menu items."
145 :type 'boolean 150 :type 'boolean
146 :group 'info) 151 :group 'info)
147 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."
2742 '(invisible t intangible t)))) 2747 '(invisible t intangible t))))
2743 (add-text-properties (match-beginning 2) (match-end 2) 2748 (add-text-properties (match-beginning 2) (match-end 2)
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)
2752 (not (string-match "\\<Index\\>" Info-current-node)) 2758 (not (string-match "\\<Index\\>" Info-current-node))
2753 ;; Don't take time to annotate huge menus 2759 ;; Don't take time to annotate huge menus
2761 'font-lock-face 'info-menu-5)) 2767 'font-lock-face 'info-menu-5))
2762 (add-text-properties (match-beginning 1) (match-end 1) 2768 (add-text-properties (match-beginning 1) (match-end 1)
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)))))
2773 2780
2774 2781