summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2003-11-01 16:38:55 +0000
committerEli Zaretskii <eliz@gnu.org>2003-11-01 16:38:55 +0000
commit867bae0b00ac9aa22648a9d82d49bc40e2ecc83b (patch)
treeb3472f692439b1497fe0be8a9de24d1eba362fab /lisp/mail
parent6cc8bc072cd444af7a8652db2df4944cee295e52 (diff)
downloademacs-867bae0b00ac9aa22648a9d82d49bc40e2ecc83b.tar.gz
(rmail-summary-goto-msg): Don't call itself
recursively if the last message is deleted, thus avoiding an infinite loop.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmailsum.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index cd8d7d67aa4..a49b47453d8 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -1074,7 +1074,8 @@ If SKIP-RMAIL, don't do anything to the Rmail buffer."
(if (< n 1)
(progn (message "No preceding message")
(setq n 1)))
- (if (> n total)
+ (if (and (> n total)
+ (> total 0))
(progn (message "No following message")
(goto-char (point-max))
(rmail-summary-goto-msg nil nowarn skip-rmail)))