+ (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))
+ (hide-tag Info-hide-note-references)
+ other-tag)
+ (when hide-tag
+ ;; *Note is often used where *note should have been
+ (goto-char start)
+ (skip-syntax-backward " ")
+ (setq other-tag
+ (cond ((memq (char-before) '(nil ?\. ?! ??))
+ "See ")
+ ((memq (char-before) '(?\, ?\; ?\: ?-))
+ "see ")
+ ((memq (char-before) '(?\( ?\[ ?\{))
+ ;; Check whether the paren is preceded by
+ ;; an end of sentence
+ (skip-syntax-backward " (")
+ (if (memq (char-before) '(nil ?\. ?! ??))
+ "See "
+ "see "))
+ ((save-match-data (looking-at "\n\n"))
+ "See ")))
+ (goto-char next))
+ (if hide-tag
+ (add-text-properties (match-beginning 1) (match-end 1)
+ '(invisible t front-sticky nil rear-nonsticky t)))
+ (add-text-properties
+ (match-beginning 2) (match-end 2)
+ (cons 'help-echo
+ (cons (if (match-end 4)
+ (concat "mouse-2: go to " (match-string 4))
+ "mouse-2: go to this node")
+ '(font-lock-face info-xref
+ mouse-face highlight))))
+ (when (eq Info-hide-note-references t)
+ (add-text-properties (match-beginning 3) (match-end 3)
+ '(invisible t front-sticky nil rear-nonsticky t)))
+ (when other-tag
+ (save-excursion
+ (goto-char (match-beginning 1))
+ (insert other-tag)))
+ (when (and Info-refill-paragraphs
+ (or hide-tag (eq Info-hide-note-references t)))
+ (push (set-marker (make-marker) start)
+ paragraph-markers)))))
+
+ (when (and Info-refill-paragraphs
+ paragraph-markers)
+ (let ((fill-nobreak-invisible t)
+ (fill-individual-varying-indent nil)
+ (paragraph-start "\f\\|[ \t]*[-*]\\|[ \t]*$")
+ (paragraph-separate ".*\\.[ \t]*\n[ \t]\\|[ \t]*[-*]\\|[ \t\f]*$")
+ (adaptive-fill-mode nil))
+ (goto-char (point-max))
+ (while paragraph-markers
+ (let ((m (car paragraph-markers)))
+ (setq paragraph-markers (cdr paragraph-markers))
+ (when (< m (point))
+ (goto-char m)
+ (beginning-of-line)
+ (let ((beg (point)))
+ (when (zerop (forward-paragraph))
+ (fill-individual-paragraphs beg (point) nil nil)
+ (goto-char beg))))
+ (set-marker m nil)))))
+