emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5660ae7 3/4: Merge from origin/emacs-28


From: Eli Zaretskii
Subject: master 5660ae7 3/4: Merge from origin/emacs-28
Date: Sun, 14 Nov 2021 08:05:54 -0500 (EST)

branch: master
commit 5660ae795b916664cea264b81febf2ed9c14f3fd
Merge: 80d23e4 5dbad52
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge from origin/emacs-28
    
    5dbad52 gnus-summary-line-format doc string clarification
    d4536ff Fix follow-scroll-down in a small buffer which starts slightl...
---
 lisp/follow.el    | 32 +++++++++++++++++++-------------
 lisp/gnus/gnus.el |  2 +-
 2 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/lisp/follow.el b/lisp/follow.el
index 2ca2c1f..3761275 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 9b3181f..4519d65 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]