diff options
| author | Karl Heuer | 1995-06-09 01:26:00 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-06-09 01:26:00 +0000 |
| commit | ed690657f21e0d648bef03e8f63fa4815b16f9da (patch) | |
| tree | ef6e02e33bca65beec507b653d2533c4a80bce3c | |
| parent | 1628adc6cd168ccd6570da6ca34123d7bd07ce33 (diff) | |
| download | emacs-ed690657f21e0d648bef03e8f63fa4815b16f9da.tar.gz emacs-ed690657f21e0d648bef03e8f63fa4815b16f9da.zip | |
(Info-mode): Doco fix.
(Info-next-preorder): Renamed from Info-next-preorder-1.
Old definition deleted.
After moving up, go to end of node.
(Info-last-preorder): If no menu, try the previous node.
After going down thru menu or to previous, position at end
of node and recenter.
After moving up, position at start of menu.
(Info-follow-nearest-node, Info-mouse-follow-nearest-node):
Use Info-next-preorder.
(Info-scroll-up, Info-scroll-down): Doc fix.
| -rw-r--r-- | lisp/info.el | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/lisp/info.el b/lisp/info.el index cb36fac8dde..b382a380490 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -1107,23 +1107,14 @@ N is the digit argument used to invoke this command." | |||
| 1107 | (list 'condition-case nil (cons 'progn (append body '(t))) '(error nil))) | 1107 | (list 'condition-case nil (cons 'progn (append body '(t))) '(error nil))) |
| 1108 | 1108 | ||
| 1109 | (defun Info-next-preorder () | 1109 | (defun Info-next-preorder () |
| 1110 | "Go to the next subnode, popping up a level if there is none." | ||
| 1111 | (interactive) | ||
| 1112 | (cond ((Info-no-error (Info-next-menu-item))) | ||
| 1113 | ((Info-no-error (Info-up)) | ||
| 1114 | (forward-line 1) | ||
| 1115 | (and (re-search-forward "^\\*" nil t) (beginning-of-line))) | ||
| 1116 | (t | ||
| 1117 | (error "No more nodes")))) | ||
| 1118 | |||
| 1119 | (defun Info-next-preorder-1 () | ||
| 1120 | "Go to the next subnode or the next node, or go up a level." | 1110 | "Go to the next subnode or the next node, or go up a level." |
| 1121 | (interactive) | 1111 | (interactive) |
| 1122 | (cond ((Info-no-error (Info-next-menu-item))) | 1112 | (cond ((Info-no-error (Info-next-menu-item))) |
| 1123 | ((Info-no-error (Info-next))) | 1113 | ((Info-no-error (Info-next))) |
| 1124 | ((Info-no-error (Info-up)) | 1114 | ((Info-no-error (Info-up)) |
| 1125 | (forward-line 1) | 1115 | ;; Since we have already gone thru all the items in this menu, |
| 1126 | (and (re-search-forward "^\\*" nil t) (beginning-of-line))) | 1116 | ;; go up to the end of this node. |
| 1117 | (goto-char (point-max))) | ||
| 1127 | (t | 1118 | (t |
| 1128 | (error "No more nodes")))) | 1119 | (error "No more nodes")))) |
| 1129 | 1120 | ||
| @@ -1134,15 +1125,22 @@ N is the digit argument used to invoke this command." | |||
| 1134 | (Info-last-menu-item) | 1125 | (Info-last-menu-item) |
| 1135 | ;; If we go down a menu item, go to the end of the node | 1126 | ;; If we go down a menu item, go to the end of the node |
| 1136 | ;; so we can scroll back through it. | 1127 | ;; so we can scroll back through it. |
| 1137 | (goto-char (point-max)))) | 1128 | (goto-char (point-max))) |
| 1138 | ((Info-no-error (Info-up)) (forward-line -1)) | 1129 | (recenter -1)) |
| 1139 | (t (error "No previous nodes")))) | 1130 | ((Info-no-error (Info-prev)) |
| 1131 | (goto-char (point-max)) | ||
| 1132 | (recenter -1)) | ||
| 1133 | ((Info-no-error (Info-up)) | ||
| 1134 | (goto-char (point-min)) | ||
| 1135 | (or (search-forward "\n* Menu:" nil t) | ||
| 1136 | (goto-char (point-max)))) | ||
| 1137 | (t (error "No previous nodes")))) | ||
| 1140 | 1138 | ||
| 1141 | (defun Info-scroll-up () | 1139 | (defun Info-scroll-up () |
| 1142 | "Scroll one screenful forward in Info, considering all nodes as one sequence. | 1140 | "Scroll one screenful forward in Info, considering all nodes as one sequence. |
| 1143 | Once you scroll far enough in a node that its menu appears on the screen, | 1141 | Once you scroll far enough in a node that its menu appears on the screen, |
| 1144 | the next scroll moves into its first subnode. When you scroll past | 1142 | the next scroll moves into its first subnode. When you scroll past |
| 1145 | the end of a node, that goes back to the parent node." | 1143 | the end of a node, that goes to the next node or back up to the parent node." |
| 1146 | (interactive) | 1144 | (interactive) |
| 1147 | (if (or (< (window-start) (point-min)) | 1145 | (if (or (< (window-start) (point-min)) |
| 1148 | (> (window-start) (point-max))) | 1146 | (> (window-start) (point-max))) |
| @@ -1159,10 +1157,9 @@ the end of a node, that goes back to the parent node." | |||
| 1159 | 1157 | ||
| 1160 | (defun Info-scroll-down () | 1158 | (defun Info-scroll-down () |
| 1161 | "Scroll one screenful back in Info, considering all nodes as one sequence. | 1159 | "Scroll one screenful back in Info, considering all nodes as one sequence. |
| 1162 | If you are within the menu of a node, this follows the previous | 1160 | Within the menu of a node, this goes to its last subnode. |
| 1163 | menu item, so that you scroll through all the subnodes, ordered | 1161 | When you scroll past the beginning of a node, that goes to the |
| 1164 | as if they appeared in place of the menu. When you scroll past | 1162 | previous node or back up to the parent node." |
| 1165 | the beginning of a node, that goes back to the parent node." | ||
| 1166 | (interactive) | 1163 | (interactive) |
| 1167 | (if (or (< (window-start) (point-min)) | 1164 | (if (or (< (window-start) (point-min)) |
| 1168 | (> (window-start) (point-max))) | 1165 | (> (window-start) (point-max))) |
| @@ -1380,7 +1377,7 @@ At end of the node's text, moves to the next node, or up if none." | |||
| 1380 | (goto-char pos)) | 1377 | (goto-char pos)) |
| 1381 | (and (not (Info-try-follow-nearest-node)) | 1378 | (and (not (Info-try-follow-nearest-node)) |
| 1382 | (save-excursion (forward-line 1) (eobp)) | 1379 | (save-excursion (forward-line 1) (eobp)) |
| 1383 | (Info-next-preorder-1))) | 1380 | (Info-next-preorder))) |
| 1384 | 1381 | ||
| 1385 | (defun Info-follow-nearest-node () | 1382 | (defun Info-follow-nearest-node () |
| 1386 | "\\<Info-mode-map>Follow a node reference near point. | 1383 | "\\<Info-mode-map>Follow a node reference near point. |
| @@ -1388,7 +1385,7 @@ Like \\[Info-menu], \\[Info-follow-reference], \\[Info-next], \\[Info-prev] or \ | |||
| 1388 | If no reference to follow, moves to the next node, or up if none." | 1385 | If no reference to follow, moves to the next node, or up if none." |
| 1389 | (interactive) | 1386 | (interactive) |
| 1390 | (or (Info-try-follow-nearest-node) | 1387 | (or (Info-try-follow-nearest-node) |
| 1391 | (Info-next-preorder-1))) | 1388 | (Info-next-preorder))) |
| 1392 | 1389 | ||
| 1393 | ;; Common subroutine. | 1390 | ;; Common subroutine. |
| 1394 | (defun Info-try-follow-nearest-node () | 1391 | (defun Info-try-follow-nearest-node () |
| @@ -1505,9 +1502,6 @@ Advanced commands: | |||
| 1505 | \\[universal-argument] \\[info] Move to new Info file with completion. | 1502 | \\[universal-argument] \\[info] Move to new Info file with completion. |
| 1506 | \\[Info-search] Search through this Info file for specified regexp, | 1503 | \\[Info-search] Search through this Info file for specified regexp, |
| 1507 | and select the node in which the next occurrence is found. | 1504 | and select the node in which the next occurrence is found. |
| 1508 | \\[Info-next-preorder] Next-preorder; that is, try to go to the next menu item, | ||
| 1509 | and if that fails try to move up, and if that fails, tell user | ||
| 1510 | he/she is done reading. | ||
| 1511 | \\[Info-next-reference] Move cursor to next cross-reference or menu item. | 1505 | \\[Info-next-reference] Move cursor to next cross-reference or menu item. |
| 1512 | \\[Info-prev-reference] Move cursor to previous cross-reference or menu item." | 1506 | \\[Info-prev-reference] Move cursor to previous cross-reference or menu item." |
| 1513 | (kill-all-local-variables) | 1507 | (kill-all-local-variables) |