aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-03 00:02:10 +0000
committerRichard M. Stallman1998-05-03 00:02:10 +0000
commit5dab2fb4c90a7769242402fcf5eee9a8728e114e (patch)
tree61b44b8d5ca971c406845a1408c9d506471096e0
parenteaff65c86b39afd757637de3b610abc701e0bdd8 (diff)
downloademacs-5dab2fb4c90a7769242402fcf5eee9a8728e114e.tar.gz
emacs-5dab2fb4c90a7769242402fcf5eee9a8728e114e.zip
(Info-up): New arg SAME-FILE: don't move to different file.
(Info-next-preorder): Pass new arg to Info-up. (Info-last-preorder): Likewise. (Info-last-preorder): Don't follow the Prev if it's same as the Up. Instead, follow it as the Up.
-rw-r--r--lisp/info.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 46c18662a78..872bd830803 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -911,10 +911,15 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
911 (interactive) 911 (interactive)
912 (Info-goto-node (Info-extract-pointer "prev[ious]*" "previous"))) 912 (Info-goto-node (Info-extract-pointer "prev[ious]*" "previous")))
913 913
914(defun Info-up () 914(defun Info-up (&optional same-file)
915 "Go to the superior node of this node." 915 "Go to the superior node of this node.
916If SAME-FILE is non-nil, do not move to a different Info file."
916 (interactive) 917 (interactive)
917 (Info-goto-node (Info-extract-pointer "up")) 918 (let ((node (Info-extract-pointer "up")))
919 (and same-file
920 (string-match "^(" node)
921 (error "Up node is in another Info file"))
922 (Info-goto-node node))
918 (Info-restore-point Info-history)) 923 (Info-restore-point Info-history))
919 924
920(defun Info-last () 925(defun Info-last ()
@@ -1277,7 +1282,7 @@ N is the digit argument used to invoke this command."
1277 (interactive) 1282 (interactive)
1278 (cond ((Info-no-error (Info-next-menu-item))) 1283 (cond ((Info-no-error (Info-next-menu-item)))
1279 ((Info-no-error (Info-next))) 1284 ((Info-no-error (Info-next)))
1280 ((Info-no-error (Info-up)) 1285 ((Info-no-error (Info-up t))
1281 ;; Since we have already gone thru all the items in this menu, 1286 ;; Since we have already gone thru all the items in this menu,
1282 ;; go up to the end of this node. 1287 ;; go up to the end of this node.
1283 (goto-char (point-max)) 1288 (goto-char (point-max))
@@ -1302,7 +1307,9 @@ N is the digit argument used to invoke this command."
1302 ;; so we can scroll back through it. 1307 ;; so we can scroll back through it.
1303 (goto-char (point-max)))) 1308 (goto-char (point-max))))
1304 (recenter -1)) 1309 (recenter -1))
1305 ((Info-no-error (Info-prev)) 1310 ((and (not (equal (Info-extract-pointer "up")
1311 (Info-extract-pointer "prev"))))
1312 (Info-no-error (Info-prev))
1306 (goto-char (point-max)) 1313 (goto-char (point-max))
1307 (while (Info-no-error 1314 (while (Info-no-error
1308 (Info-last-menu-item) 1315 (Info-last-menu-item)
@@ -1310,7 +1317,7 @@ N is the digit argument used to invoke this command."
1310 ;; so we can scroll back through it. 1317 ;; so we can scroll back through it.
1311 (goto-char (point-max)))) 1318 (goto-char (point-max))))
1312 (recenter -1)) 1319 (recenter -1))
1313 ((Info-no-error (Info-up)) 1320 ((Info-no-error (Info-up t))
1314 (goto-char (point-min)) 1321 (goto-char (point-min))
1315 (or (search-forward "\n* Menu:" nil t) 1322 (or (search-forward "\n* Menu:" nil t)
1316 (goto-char (point-max)))) 1323 (goto-char (point-max))))