Function: Info-follow-nearest-node
Info-follow-nearest-node is an interactive and byte-compiled function
defined in info.el.gz.
Signature
(Info-follow-nearest-node &optional FORK)
Documentation
Follow a node reference near point.
If point is on a reference, follow that reference. Otherwise, if point is in a menu item description, follow that menu item.
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.
This function has :around advice: Info-follow-nearest-node@gitman.
Key Bindings
Aliases
prolog-Info-follow-nearest-node (obsolete since 27.1)
Source Code
;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-follow-nearest-node (&optional fork)
"Follow a node reference near point.
If point is on a reference, follow that reference. Otherwise,
if point is in a menu item description, follow that menu item.
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 "P" Info-mode)
(or (Info-try-follow-nearest-node fork)
(when (save-excursion
(search-backward "\n* menu:" nil t))
(save-excursion
(beginning-of-line)
(while (not (or (bobp) (looking-at "[^ \t]\\|[ \t]*$")))
(beginning-of-line 0))
(when (looking-at "\\* +\\([^\t\n]*\\):")
(Info-goto-node
(Info-extract-menu-item (match-string-no-properties 1)) fork)
t)))
(and (eq this-command 'Info-mouse-follow-nearest-node)
;; Don't raise an error when mouse-1 is bound to this - it's
;; often used to simply select the window or frame.
(eq 'mouse-1 (event-basic-type last-input-event)))
(user-error "Point neither on reference nor in menu item description")))