emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ca8dbde: Replace 2 checks in rmailsum.el with 'pos-


From: Charles A. Roelli
Subject: [Emacs-diffs] master ca8dbde: Replace 2 checks in rmailsum.el with 'pos-visible-in-window-p'
Date: Thu, 23 Aug 2018 16:10:54 -0400 (EDT)

branch: master
commit ca8dbde14b2b2025aa69c52378904ee5c573a0d7
Author: Charles A. Roelli <address@hidden>
Commit: Charles A. Roelli <address@hidden>

    Replace 2 checks in rmailsum.el with 'pos-visible-in-window-p'
    
    * lisp/mail/rmailsum.el (rmail-summary-scroll-msg-up)
    (rmail-summary-scroll-msg-down): Use 'pos-visible-in-window-p'
    instead of checking the condition by hand.
---
 lisp/mail/rmailsum.el | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index e5363d2..10345b6 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -1315,11 +1315,7 @@ advance to the next message."
                (select-window rmail-buffer-window)
                (prog1
                    ;; Is EOB visible in the buffer?
-                   (save-excursion
-                     (let ((ht (window-height)))
-                       (move-to-window-line (- ht 2))
-                       (end-of-line)
-                       (eobp)))
+                    (pos-visible-in-window-p (point-max))
                  (select-window rmail-summary-window)))
              (if (not rmail-summary-scroll-between-messages)
                  (error "End of buffer")
@@ -1342,10 +1338,7 @@ move to the previous message."
                (select-window rmail-buffer-window)
                (prog1
                    ;; Is BOB visible in the buffer?
-                   (save-excursion
-                     (move-to-window-line 0)
-                     (beginning-of-line)
-                     (bobp))
+                   (pos-visible-in-window-p (point-min))
                  (select-window rmail-summary-window)))
              (if (not rmail-summary-scroll-between-messages)
                  (error "Beginning of buffer")



reply via email to

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