diff options
author | Charles A. Roelli <charles@aurox.ch> | 2018-08-23 22:10:08 +0200 |
---|---|---|
committer | Charles A. Roelli <charles@aurox.ch> | 2018-08-23 22:10:08 +0200 |
commit | ca8dbde14b2b2025aa69c52378904ee5c573a0d7 (patch) | |
tree | bee9e1c6840359c81ee620196f6788c2efbae276 /lisp/mail/rmailsum.el | |
parent | 3946e1db2461c6851b83cb088ad66191f797ed08 (diff) | |
download | emacs-ca8dbde14b2b2025aa69c52378904ee5c573a0d7.tar.gz |
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.
Diffstat (limited to 'lisp/mail/rmailsum.el')
-rw-r--r-- | lisp/mail/rmailsum.el | 11 |
1 files changed, 2 insertions, 9 deletions
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") |