diff options
author | Miles Bader <miles@gnu.org> | 2000-12-12 07:15:52 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2000-12-12 07:15:52 +0000 |
commit | c2def7a092852d93c580c3084c1ee8161f5c1c17 (patch) | |
tree | 01daf6621c8f2609a697521010d912fe1e62022a | |
parent | 591b63b4245020c6ffd6ec7416dd45e3be62c1d0 (diff) | |
download | emacs-c2def7a092852d93c580c3084c1ee8161f5c1c17.tar.gz |
(Info-last-preorder): Don't barf on nodes without a prev.
(Info-scroll-down): Respect `Info-scroll-prefer-subnodes'.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/info.el | 26 |
2 files changed, 20 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c2a000e908d..30b8cebc5de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-12-12 Miles Bader <miles@gnu.org> + + * info.el (Info-last-preorder): Don't barf on nodes without a prev. + (Info-scroll-down): Respect `Info-scroll-prefer-subnodes'. + 2000-12-12 Andrew Choi <akochoi@i-cable.com> * term/mac-win.el: Remove load for ls-lisp. diff --git a/lisp/info.el b/lisp/info.el index d9efaa7ad37..948e106a51e 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1612,7 +1612,8 @@ N is the digit argument used to invoke this command." ;; 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 @@ in other ways.)" (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)))) |