diff options
author | Richard M. Stallman <rms@gnu.org> | 1992-10-02 23:52:26 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1992-10-02 23:52:26 +0000 |
commit | f9969361bd98a6def908db1670f15d7c8dad1785 (patch) | |
tree | c372cc0db24fc49b4fb5c502070c6ba58bdc22ea /lisp/info.el | |
parent | 21cf4cf8a9a4cc24e21b03c0bec98286dac4a1dc (diff) | |
download | emacs-f9969361bd98a6def908db1670f15d7c8dad1785.tar.gz |
(Info-follow-nearest-node): Handle line breaks after *note.
Fix interactive spec. Doc fix. Put on mouse-3.
Diffstat (limited to 'lisp/info.el')
-rw-r--r-- | lisp/info.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/info.el b/lisp/info.el index bf6dec805ea..c7939272948 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -827,9 +827,10 @@ SIG optional fourth argument, controls action on no match (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 @@ At end of the node's text, moves to the next node." (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 @@ At end of the node's text, moves to the next node." (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. |