Mercurial > emacs
changeset 48118:40e2242be50f
(Info-hide-note-references): nil value now does no
reformatting at all. New choice 'tag reformats tag but shows
the section reference.
(Info-fontify-node): Use it.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Fri, 01 Nov 2002 22:48:12 +0000 |
parents | 7897f914f414 |
children | df3f64f68cfe |
files | lisp/info.el |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/info.el Fri Nov 01 22:47:37 2002 +0000 +++ b/lisp/info.el Fri Nov 01 22:48:12 2002 +0000 @@ -146,8 +146,13 @@ :group 'info) (defcustom Info-hide-note-references t - "*If non-nil, hide the section reference in *note and * menu items." - :type 'boolean + "*If non-nil, hide the tag and section reference in *note and * menu items. +Also replaces the \"*note\" text with \"see\". +If value is a number, the reference section is still shown." + :version "21.4" + :type '(choice (const :tag "Replace tag and hide reference" t) + (const :tag "Replace only tag" tag) + (const :tag "No reformatting" nil)) :group 'info) (defcustom Info-mode-hook '(turn-on-font-lock) @@ -2725,7 +2730,7 @@ (while (re-search-forward "\\(\\*Note[ \n\t]+\\)\\([^:]*\\)\\(:[^.,:]*[,:]?\\)" nil t) (unless (= (char-after (1- (match-beginning 0))) ?\") ; hack (let ((next (point)) - (hide-tag font-lock-mode) + (hide-tag Info-hide-note-references) other-tag) (when hide-tag ;; *Note is often used where *note should have been @@ -2749,7 +2754,7 @@ '(font-lock-face info-xref mouse-face highlight help-echo "mouse-2: go to this node")) - (if Info-hide-note-references + (if (eq Info-hide-note-references t) (add-text-properties (match-beginning 3) (match-end 3) '(invisible t intangible t)))))) @@ -2769,7 +2774,7 @@ '(font-lock-face info-xref mouse-face highlight help-echo "mouse-2: go to this node")) - (if Info-hide-note-references + (if (eq Info-hide-note-references t) (add-text-properties (match-beginning 2) (match-end 2) (list 'display (make-string (max 2 (- 22 (- (match-end 1) (match-beginning 1)))) ? )