Function: Info-forward-node
Info-forward-node is an interactive and byte-compiled function defined
in info.el.gz.
Signature
(Info-forward-node &optional NOT-DOWN NOT-UP NO-ERROR)
Documentation
Go forward one node, considering all nodes as forming one sequence.
Interactively, if the current node has sub-nodes, descend into the first sub-node; otherwise go to the "next" node, if it exists, else go "up" to the parent node. When called from Lisp, NOT-DOWN non-nil means don't descend into sub-nodes, NOT-UP non-nil means don't go to parent nodes, and NO-ERROR non-nil means don't signal a user-error if there's no node to go to.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-forward-node (&optional not-down not-up no-error)
"Go forward one node, considering all nodes as forming one sequence.
Interactively, if the current node has sub-nodes, descend into the first
sub-node; otherwise go to the \"next\" node, if it exists, else go \"up\"
to the parent node.
When called from Lisp, NOT-DOWN non-nil means don't descend into sub-nodes,
NOT-UP non-nil means don't go to parent nodes, and NO-ERROR non-nil means
don't signal a user-error if there's no node to go to."
(interactive nil Info-mode)
(goto-char (point-min))
(forward-line 1)
(let ((case-fold-search t))
;; three possibilities, in order of priority:
;; 1. next node is in a menu in this node (but not in an index)
;; 2. next node is next at same level
;; 3. next node is up and next
(cond ((and (not not-down)
(save-excursion (search-forward "\n* menu:" nil t))
(not (Info-index-node)))
(Info-goto-node (Info-extract-menu-counting 1))
t)
((save-excursion (search-backward "next:" nil t))
(Info-next)
t)
((and (not not-up)
(save-excursion (search-backward "up:" nil t))
;; Use string-equal, not equal, to ignore text props.
(not (string-equal (downcase (Info-extract-pointer "up"))
"top")))
(let ((old-node Info-current-node))
(Info-up)
(let ((old-history Info-history)
success)
(unwind-protect
(setq success (Info-forward-node t nil no-error))
(or success (Info-goto-node old-node)))
(if Info-history-skip-intermediate-nodes
(setq Info-history old-history)))))
(no-error nil)
(t (user-error "No pointer forward from this node")))))