changeset 1309:aa286e6e7bec

(Info-follow-nearest-node): Handle line breaks after *note. Fix interactive spec. Doc fix. Put on mouse-3.
author Richard M. Stallman <rms@gnu.org>
date Fri, 02 Oct 1992 23:52:26 +0000
parents 2660a7053836
children 8db103d11270
files lisp/info.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Fri Oct 02 23:43:16 1992 +0000
+++ b/lisp/info.el	Fri Oct 02 23:52:26 1992 +0000
@@ -827,9 +827,10 @@
 	     (error "No %s around position %d" errorstring pos))))))
 
 (defun Info-follow-nearest-node (click)
-  "\\<Info-mode-map>Follow a node reference near point.  Like \\[Info-menu], \\Info-follow-reference], \\[Info-next], \\[Info-previous] or \\Info-up] command.
+  "\\<Info-mode-map>Follow a node reference near point.
+Like \\[Info-menu], \\[Info-follow-reference], \\[Info-next], \\[Info-prev] or \\[Info-up] command, depending on where you click.
 At end of the node's text, moves to the next node."
-  (interactive "K")
+  (interactive "e")
   (let* ((relative-coordinates (coordinates-in-window-p (mouse-coords click)
 							(selected-window)))
 	 (rel-x (car relative-coordinates))
@@ -838,7 +839,7 @@
     (move-to-column rel-x))
   (let (node)
     (cond
-     ((setq node (Info-get-token (point) "\\*note " "\\*note \\([^:]*\\):" t))
+     ((setq node (Info-get-token (point) "\\*note[ \n]" "\\*note[ \n]\\([^:]*\\):" t))
       (Info-follow-reference node))
      ((setq node (Info-get-token (point) "\\* " "\\* \\([^:]*\\)::" t))
       (Info-goto-node node))
@@ -894,6 +895,7 @@
   (define-key Info-mode-map "s" 'Info-search)
   (define-key Info-mode-map "u" 'Info-up)
   (define-key Info-mode-map "\177" 'Info-scroll-down)
+  (define-key Info-mode-map [mouse-3] 'Info-follow-nearest-node)
   )
 
 ;; Info mode is suitable only for specially formatted data.