weiner@novavax.UUCP (Bob Weiner) (03/15/90)
Replace the following function in the "smart-info.el" library so that
node references split across lines are followed properly.
;;
;; Bob Weiner, 03/14/90
;; Truly fixed Info-handle-in-note to handle *Note references split across lines.
;;
(defun Info-handle-in-note ()
"If point is within the first line of an Info note (cross-reference), follow
cross-reference and return t; otherwise return nil."
(let ((note-name) (bol) (opoint (point)) (i))
(save-excursion
(beginning-of-line)
(setq bol (point))
(end-of-line)
(if (and (re-search-backward "\*Note\\([ \t]+\\|$\\)" bol t)
(<= (point) opoint)
(looking-at "\*Note[ \t\n]+\\([^:]*\\):"))
(setq note-name (buffer-substring
(match-beginning 1)
(match-end 1)))))
(if (not note-name)
nil
;; Remove newline and extra spaces from 'note-name'
(setq i 0)
(while (setq i (string-match "[ \n\t]+" note-name i))
(setq note-name (concat (substring note-name 0 i) " "
(substring note-name (match-end 0))))
(setq i (1+ i)))
(Info-goto-node note-name)
t)))
--
Bob Weiner, Motorola, Inc., USENET: ...!gatech!uflorida!novavax!weiner
(407) 364-2087