aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles A. Roelli2018-08-23 22:10:08 +0200
committerCharles A. Roelli2018-08-23 22:10:08 +0200
commitca8dbde14b2b2025aa69c52378904ee5c573a0d7 (patch)
treebee9e1c6840359c81ee620196f6788c2efbae276
parent3946e1db2461c6851b83cb088ad66191f797ed08 (diff)
downloademacs-ca8dbde14b2b2025aa69c52378904ee5c573a0d7.tar.gz
emacs-ca8dbde14b2b2025aa69c52378904ee5c573a0d7.zip
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.
-rw-r--r--lisp/mail/rmailsum.el11
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."
1315 (select-window rmail-buffer-window) 1315 (select-window rmail-buffer-window)
1316 (prog1 1316 (prog1
1317 ;; Is EOB visible in the buffer? 1317 ;; Is EOB visible in the buffer?
1318 (save-excursion 1318 (pos-visible-in-window-p (point-max))
1319 (let ((ht (window-height)))
1320 (move-to-window-line (- ht 2))
1321 (end-of-line)
1322 (eobp)))
1323 (select-window rmail-summary-window))) 1319 (select-window rmail-summary-window)))
1324 (if (not rmail-summary-scroll-between-messages) 1320 (if (not rmail-summary-scroll-between-messages)
1325 (error "End of buffer") 1321 (error "End of buffer")
@@ -1342,10 +1338,7 @@ move to the previous message."
1342 (select-window rmail-buffer-window) 1338 (select-window rmail-buffer-window)
1343 (prog1 1339 (prog1
1344 ;; Is BOB visible in the buffer? 1340 ;; Is BOB visible in the buffer?
1345 (save-excursion 1341 (pos-visible-in-window-p (point-min))
1346 (move-to-window-line 0)
1347 (beginning-of-line)
1348 (bobp))
1349 (select-window rmail-summary-window))) 1342 (select-window rmail-summary-window)))
1350 (if (not rmail-summary-scroll-between-messages) 1343 (if (not rmail-summary-scroll-between-messages)
1351 (error "Beginning of buffer") 1344 (error "Beginning of buffer")