Mercurial > emacs
changeset 34468:7ae9e37868e6
(Info-last-preorder): Don't barf on nodes without a prev.
(Info-scroll-down): Respect `Info-scroll-prefer-subnodes'.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 12 Dec 2000 07:14:36 +0000 |
parents | 95887061f1e4 |
children | c39d54313c6b |
files | lisp/info.el |
diffstat | 1 files changed, 15 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/info.el Tue Dec 12 05:04:07 2000 +0000 +++ b/lisp/info.el Tue Dec 12 07:14:36 2000 +0000 @@ -1612,7 +1612,8 @@ ;; so we can scroll back through it. (goto-char (point-max)))) (recenter -1)) - ((and (not (equal (Info-extract-pointer "up") + ((and (Info-no-error (Info-extract-pointer "prev")) + (not (equal (Info-extract-pointer "up") (Info-extract-pointer "prev")))) (Info-no-error (Info-prev)) (goto-char (point-max)) @@ -1664,22 +1665,25 @@ (defun Info-scroll-down () "Scroll one screenful back in Info, considering all nodes as one sequence. -Within the menu of a node, this goes to its last subnode. -When you scroll past the beginning of a node, that goes to the -previous node or back up to the parent node." +If point is within the menu of a node, and `Info-scroll-prefer-subnodes' +is non-nil, this goes to its last subnode. When you scroll past the +beginning of a node, that goes to the previous node or back up to the +parent node." (interactive) (if (or (< (window-start) (point-min)) (> (window-start) (point-max))) (set-window-start (selected-window) (point))) (let* ((case-fold-search t) (current-point (point)) - (virtual-end (save-excursion - (beginning-of-line) - (setq current-point (point)) - (goto-char (point-min)) - (search-forward "\n* Menu:" - current-point - t)))) + (virtual-end + (and Info-scroll-prefer-subnodes + (save-excursion + (beginning-of-line) + (setq current-point (point)) + (goto-char (point-min)) + (search-forward "\n* Menu:" + current-point + t))))) (if (or virtual-end (pos-visible-in-window-p (point-min))) (Info-last-preorder) (scroll-down))))