Function: Info-menu
Info-menu is an interactive and byte-compiled function defined in
info.el.gz.
Signature
(Info-menu MENU-ITEM &optional FORK)
Documentation
Go to the node pointed to by the menu item named (or abbreviated) MENU-ITEM.
The menu item should one of those listed in the current node's menu. Completion is allowed, and the default menu item is the one point is on. If FORK is non-nil (interactively with a prefix arg), show the node in a new Info buffer. If FORK is a string, it is the name to use for the new buffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-menu (menu-item &optional fork)
"Go to the node pointed to by the menu item named (or abbreviated) MENU-ITEM.
The menu item should one of those listed in the current node's menu.
Completion is allowed, and the default menu item is the one point is on.
If FORK is non-nil (interactively with a prefix arg), show the node in
a new Info buffer. If FORK is a string, it is the name to use for the
new buffer."
(interactive
(let (;; If point is within a menu item, use that item as the default
(default nil)
(p (point))
beg
(case-fold-search t))
(save-excursion
(goto-char (point-min))
(if (not (search-forward "\n* menu:" nil t))
(user-error "No menu in this node"))
(setq beg (point))
(and (< (point) p)
(save-excursion
(goto-char p)
(end-of-line)
(if (re-search-backward (concat "\n\\* +\\("
Info-menu-entry-name-re
"\\):")
beg t)
(setq default (match-string-no-properties 1))))))
(let ((item nil))
(while (null item)
(setq item (let ((completion-ignore-case t)
(Info-complete-menu-buffer (current-buffer)))
(completing-read (format-prompt "Menu item" default)
#'Info-complete-menu-item nil t nil nil
default))))
(list item current-prefix-arg)))
Info-mode)
;; there is a problem here in that if several menu items have the same
;; name you can only go to the node of the first with this command.
(Info-goto-node (Info-extract-menu-item menu-item)
(and fork
(if (stringp fork) fork menu-item))))