diff options
| author | Richard M. Stallman | 1992-10-02 23:52:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1992-10-02 23:52:26 +0000 |
| commit | f9969361bd98a6def908db1670f15d7c8dad1785 (patch) | |
| tree | c372cc0db24fc49b4fb5c502070c6ba58bdc22ea | |
| parent | 21cf4cf8a9a4cc24e21b03c0bec98286dac4a1dc (diff) | |
| download | emacs-f9969361bd98a6def908db1670f15d7c8dad1785.tar.gz emacs-f9969361bd98a6def908db1670f15d7c8dad1785.zip | |
(Info-follow-nearest-node): Handle line breaks after *note.
Fix interactive spec. Doc fix. Put on mouse-3.
| -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 | |||
| 827 | (error "No %s around position %d" errorstring pos)))))) | 827 | (error "No %s around position %d" errorstring pos)))))) |
| 828 | 828 | ||
| 829 | (defun Info-follow-nearest-node (click) | 829 | (defun Info-follow-nearest-node (click) |
| 830 | "\\<Info-mode-map>Follow a node reference near point. Like \\[Info-menu], \\Info-follow-reference], \\[Info-next], \\[Info-previous] or \\Info-up] command. | 830 | "\\<Info-mode-map>Follow a node reference near point. |
| 831 | Like \\[Info-menu], \\[Info-follow-reference], \\[Info-next], \\[Info-prev] or \\[Info-up] command, depending on where you click. | ||
| 831 | At end of the node's text, moves to the next node." | 832 | At end of the node's text, moves to the next node." |
| 832 | (interactive "K") | 833 | (interactive "e") |
| 833 | (let* ((relative-coordinates (coordinates-in-window-p (mouse-coords click) | 834 | (let* ((relative-coordinates (coordinates-in-window-p (mouse-coords click) |
| 834 | (selected-window))) | 835 | (selected-window))) |
| 835 | (rel-x (car relative-coordinates)) | 836 | (rel-x (car relative-coordinates)) |
| @@ -838,7 +839,7 @@ At end of the node's text, moves to the next node." | |||
| 838 | (move-to-column rel-x)) | 839 | (move-to-column rel-x)) |
| 839 | (let (node) | 840 | (let (node) |
| 840 | (cond | 841 | (cond |
| 841 | ((setq node (Info-get-token (point) "\\*note " "\\*note \\([^:]*\\):" t)) | 842 | ((setq node (Info-get-token (point) "\\*note[ \n]" "\\*note[ \n]\\([^:]*\\):" t)) |
| 842 | (Info-follow-reference node)) | 843 | (Info-follow-reference node)) |
| 843 | ((setq node (Info-get-token (point) "\\* " "\\* \\([^:]*\\)::" t)) | 844 | ((setq node (Info-get-token (point) "\\* " "\\* \\([^:]*\\)::" t)) |
| 844 | (Info-goto-node node)) | 845 | (Info-goto-node node)) |
| @@ -894,6 +895,7 @@ At end of the node's text, moves to the next node." | |||
| 894 | (define-key Info-mode-map "s" 'Info-search) | 895 | (define-key Info-mode-map "s" 'Info-search) |
| 895 | (define-key Info-mode-map "u" 'Info-up) | 896 | (define-key Info-mode-map "u" 'Info-up) |
| 896 | (define-key Info-mode-map "\177" 'Info-scroll-down) | 897 | (define-key Info-mode-map "\177" 'Info-scroll-down) |
| 898 | (define-key Info-mode-map [mouse-3] 'Info-follow-nearest-node) | ||
| 897 | ) | 899 | ) |
| 898 | 900 | ||
| 899 | ;; Info mode is suitable only for specially formatted data. | 901 | ;; Info mode is suitable only for specially formatted data. |