diff options
-rw-r--r-- | lisp/follow.el | 32 | ||||
-rw-r--r-- | lisp/gnus/gnus.el | 2 |
2 files changed, 20 insertions, 14 deletions
diff --git a/lisp/follow.el b/lisp/follow.el index 2ca2c1f17ba..3761275bbf6 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -669,24 +669,30 @@ Works like `scroll-down' when not in Follow mode." (t (let* ((orig-point (point)) (windows (follow-all-followers)) - (win (car (reverse windows))) - (start (window-start (car windows)))) + (start (window-start (car windows))) + (lines 0)) (if (eq start (point-min)) (if (or (null scroll-error-top-bottom) (bobp)) (signal 'beginning-of-buffer nil) (goto-char (point-min))) - (select-window win) - (goto-char start) - (vertical-motion (- (- (window-height win) - (if header-line-format 2 1) ; always mode-line - (if tab-line-format 1 0) - next-screen-context-lines))) - (set-window-start win (point)) - (if (< orig-point (window-end win t)) - (goto-char orig-point) - (goto-char start) - (vertical-motion (- next-screen-context-lines 1))) + (select-window (car windows)) + (dolist (win windows) + (setq lines + (+ lines + (- (window-height win) + (if header-line-format 2 1) ; Count mode-line, too. + (if tab-line-format 1 0))))) + (setq lines (- lines next-screen-context-lines)) + (goto-char start) + (let ((at-top (> (vertical-motion (- lines)) (- lines)))) + (set-window-start (car windows) (point)) + (if at-top + (goto-char orig-point) + (goto-char start) + (vertical-motion (- next-screen-context-lines 1)) + (if (< orig-point (point)) + (goto-char orig-point)))) (setq follow-internal-force-redisplay t)))))) (put 'follow-scroll-down 'scroll-command t) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 9b3181fd4d0..4519d65aa84 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -2749,7 +2749,7 @@ with some simple extensions. %F Contents of the From: header (string) %f Contents of the From: or To: headers (string) %x Contents of the Xref: header (string) -%D Date of the article (string) +%D Contents of the Date: header article (string) %d Date of the article (string) in DD-MMM format %o Date of the article (string) in YYYYMMDD`T'HHMMSS format |