From: Charles A. Roelli Date: Thu, 23 Aug 2018 20:10:08 +0000 (+0200) Subject: Replace 2 checks in rmailsum.el with 'pos-visible-in-window-p' X-Git-Tag: emacs-27.0.90~4516 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ca8dbde14b2b2025aa69c52378904ee5c573a0d7;p=emacs.git 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. --- diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index e5363d2198c..10345b63ae2 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")