aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-06-30 08:12:17 +0000
committerRichard M. Stallman1996-06-30 08:12:17 +0000
commitb54d0f0ec808ecf7cec3fc37825e6e2517d60d89 (patch)
treef11b16f9764adfcb9006cc0cf6d2e23865aade06
parentbce97856eb9982414bc9bdea3a6b3d6aee334414 (diff)
downloademacs-b54d0f0ec808ecf7cec3fc37825e6e2517d60d89.tar.gz
emacs-b54d0f0ec808ecf7cec3fc37825e6e2517d60d89.zip
(Info-next-preorder): After we move up, move forward again.
(Info-last-preorder): After we move down or to the prev, move down again.
-rw-r--r--lisp/info.el27
1 files changed, 23 insertions, 4 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 1e6e0dd472c..ead6ab92c98 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1184,7 +1184,10 @@ N is the digit argument used to invoke this command."
1184 ((Info-no-error (Info-up)) 1184 ((Info-no-error (Info-up))
1185 ;; Since we have already gone thru all the items in this menu, 1185 ;; Since we have already gone thru all the items in this menu,
1186 ;; go up to the end of this node. 1186 ;; go up to the end of this node.
1187 (goto-char (point-max))) 1187 (goto-char (point-max))
1188 ;; Since logically we are done with the node with that menu,
1189 ;; move on from it.
1190 (Info-next-preorder))
1188 (t 1191 (t
1189 (error "No more nodes")))) 1192 (error "No more nodes"))))
1190 1193
@@ -1196,9 +1199,20 @@ N is the digit argument used to invoke this command."
1196 ;; If we go down a menu item, go to the end of the node 1199 ;; If we go down a menu item, go to the end of the node
1197 ;; so we can scroll back through it. 1200 ;; so we can scroll back through it.
1198 (goto-char (point-max))) 1201 (goto-char (point-max)))
1202 ;; Keep going down, as long as there are nested menu nodes.
1203 (while (Info-no-error
1204 (Info-last-menu-item)
1205 ;; If we go down a menu item, go to the end of the node
1206 ;; so we can scroll back through it.
1207 (goto-char (point-max))))
1199 (recenter -1)) 1208 (recenter -1))
1200 ((Info-no-error (Info-prev)) 1209 ((Info-no-error (Info-prev))
1201 (goto-char (point-max)) 1210 (goto-char (point-max))
1211 (while (Info-no-error
1212 (Info-last-menu-item)
1213 ;; If we go down a menu item, go to the end of the node
1214 ;; so we can scroll back through it.
1215 (goto-char (point-max))))
1202 (recenter -1)) 1216 (recenter -1))
1203 ((Info-no-error (Info-up)) 1217 ((Info-no-error (Info-up))
1204 (goto-char (point-min)) 1218 (goto-char (point-min))
@@ -1234,9 +1248,14 @@ previous node or back up to the parent node."
1234 (if (or (< (window-start) (point-min)) 1248 (if (or (< (window-start) (point-min))
1235 (> (window-start) (point-max))) 1249 (> (window-start) (point-max)))
1236 (set-window-start (selected-window) (point))) 1250 (set-window-start (selected-window) (point)))
1237 (let ((virtual-end (save-excursion 1251 (let* ((current-point (point))
1238 (goto-char (point-min)) 1252 (virtual-end (save-excursion
1239 (search-forward "\n* Menu:" nil t)))) 1253 (beginning-of-line)
1254 (setq current-point (point))
1255 (goto-char (point-min))
1256 (search-forward "\n* Menu:"
1257 current-point
1258 t))))
1240 (if (or virtual-end (pos-visible-in-window-p (point-min))) 1259 (if (or virtual-end (pos-visible-in-window-p (point-min)))
1241 (Info-last-preorder) 1260 (Info-last-preorder)
1242 (scroll-down)))) 1261 (scroll-down))))