changeset 50004:14d6d1ad4a06

(Info-fontify-node): Don't hide indentation before the reference name. Don't process a reference twice when a new tag is inserted. (Info-hide-note-references): Fix doc and customize type.
author Andreas Schwab <schwab@suse.de>
date Sun, 02 Mar 2003 23:33:56 +0000
parents cdd2ba318b01
children be0d26ee0479
files lisp/info.el
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Sun Mar 02 20:02:19 2003 +0000
+++ b/lisp/info.el	Sun Mar 02 23:33:56 2003 +0000
@@ -154,11 +154,11 @@
 (defcustom Info-hide-note-references t
   "*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."
+If value is non-nil but not t, 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))
+  :type '(choice (const :tag "No reformatting" nil)
+		 (const :tag "Replace tag and hide reference" t)
+		 (other :tag "Replace only tag" tag))
   :group 'info)
 
 (defcustom Info-mode-hook '(turn-on-font-lock)
@@ -2789,7 +2789,7 @@
 	    (add-text-properties (match-beginning 2) (1+ (match-end 2))
 				 '(invisible t))))
 	(goto-char (point-min))
-	(while (re-search-forward "\\(\\*Note[ \n\t]*\\)\\([^:]*\\)\\(:[^.,:(]*\\(([^)]*)[^.,:]*\\)?[,:]?\n?\\)" nil t)
+	(while (re-search-forward "\\(\\*Note[ \t]*\\)\n?[ \t]*\\([^:]*\\)\\(:[^.,:(]*\\(([^)]*)[^.,:]*\\)?[,:]?\n?\\)" nil t)
 	  (unless (= (char-after (1- (match-beginning 0))) ?\") ; hack
 	    (let ((start (match-beginning 0))
 		  (next (point))
@@ -2819,8 +2819,9 @@
 		(add-text-properties (match-beginning 3) (match-end 3)
 				     '(invisible t)))
 	      (when other-tag
-		(goto-char (match-beginning 1))
-		(insert other-tag))
+		(save-excursion
+		  (goto-char (match-beginning 1))
+		  (insert other-tag)))
 	      (when (or hide-tag (eq Info-hide-note-references t))
 		(setq paragraph-markers (cons (set-marker (make-marker) start)
 					      paragraph-markers))))))