]> code.delx.au - gnu-emacs/commitdiff
(Info-next-menu-item): Stay on top of node.
authorRichard M. Stallman <rms@gnu.org>
Thu, 22 Oct 1998 01:35:03 +0000 (01:35 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 22 Oct 1998 01:35:03 +0000 (01:35 +0000)
lisp/info.el

index 28ce27525f82e4673dbe05e3832d4816eba7d369..0164dedd2939e1db2c18484ae0d589f29512ca1a 100644 (file)
@@ -1357,12 +1357,14 @@ N is the digit argument used to invoke this command."
 
 (defun Info-next-menu-item ()
   (interactive)
-  (save-excursion
-    (forward-line -1)
-    (search-forward "\n* menu:" nil t)
-    (or (search-forward "\n* " nil t)
-       (error "No more items in menu"))
-    (Info-goto-node (Info-extract-menu-node-name))))
+  (let ((node
+        (save-excursion
+          (forward-line -1)
+          (search-forward "\n* menu:" nil t)
+          (and (search-forward "\n* " nil t)
+               (Info-extract-menu-node-name)))))
+    (if node (Info-goto-node node)
+      (error "No more items in menu"))))
 
 (defun Info-last-menu-item ()
   (interactive)