From: Stephen Berman Date: Tue, 25 Aug 2020 11:30:58 +0000 (+0200) Subject: Tweak how "u" works in Info buffers when scroll-conservatively is set X-Git-Tag: emacs-28.0.90~6417 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=71209b231a806bcc23f4fbe44a5fe54583809889;p=emacs.git Tweak how "u" works in Info buffers when scroll-conservatively is set * info.el (Info-up): If scroll-conservatively is non-zero and less than 101, display as much of the superior node above the target line as possible (Bug#13690). --- diff --git a/lisp/info.el b/lisp/info.el index 78f88947c79..fc04099e7e9 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2308,7 +2308,11 @@ If SAME-FILE is non-nil, do not move to a different Info file." nil t)) (progn (beginning-of-line) (if (looking-at "^\\* ") (forward-char 2))) (goto-char p) - (Info-restore-point Info-history))))) + (Info-restore-point Info-history)))) + ;; If scroll-conservatively is non-zerop and less than 101, display + ;; as much of the superior node above the target line as possible. + (when (< 0 scroll-conservatively 101) + (recenter))) (defun Info-history-back () "Go back in the history to the last node visited."