Function: Info-up
Info-up is an interactive and byte-compiled function defined in
info.el.gz.
Signature
(Info-up &optional SAME-FILE)
Documentation
Go to the superior node of this node.
If SAME-FILE is non-nil, do not move to a different Info file.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-up (&optional same-file)
"Go to the superior node of this node.
If SAME-FILE is non-nil, do not move to a different Info file."
(interactive nil Info-mode)
;; In case another window is currently selected
(save-window-excursion
(or (derived-mode-p 'Info-mode) (info-pop-to-buffer))
(let ((old-node Info-current-node)
(old-file Info-current-file)
(node (Info-extract-pointer "up")) p)
(and same-file
(string-match "^(" node)
(error "Up node is in another Info file"))
(Info-goto-node node)
(setq p (point))
(goto-char (point-min))
(if (and (stringp old-file)
(search-forward "\n* Menu:" nil t)
(re-search-forward
(if (string-equal old-node "Top")
(concat "\n\\*[^:]+: +(" (file-name-nondirectory old-file) ")")
(concat "\n\\* +\\(" (regexp-quote old-node)
":\\|[^:]+: +" (regexp-quote old-node) "\\)"))
nil t))
(progn (beginning-of-line) (if (looking-at "^\\* ") (forward-char 2)))
(goto-char p)
(Info-restore-point Info-history))))
;; If scroll-conservatively is non-zero and less than 101, display
;; as much of the superior node above the target line as possible.
(when (< 0 scroll-conservatively 101)
(recenter)))