From: Richard M. Stallman Date: Thu, 22 Oct 1998 01:35:03 +0000 (+0000) Subject: (Info-next-menu-item): Stay on top of node. X-Git-Tag: emacs-20.4~1416 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fadfb77f9bf1867ff7e4cb591babe87b5484fb9e;p=emacs.git (Info-next-menu-item): Stay on top of node. --- diff --git a/lisp/info.el b/lisp/info.el index 28ce27525f8..0164dedd293 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -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)