summaryrefslogtreecommitdiff
path: root/lisp/mail/rmailsum.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2009-01-31 03:15:35 +0000
committerGlenn Morris <rgm@gnu.org>2009-01-31 03:15:35 +0000
commitab383a615f145c03fa62cb469c3307b0df7be1fc (patch)
treeb1a3f94f85312f04095aadf0888ec9ce0e8dcf89 /lisp/mail/rmailsum.el
parent49e787c9e2d49f3bdcf8a287ea15bcbbd4a90fb9 (diff)
downloademacs-ab383a615f145c03fa62cb469c3307b0df7be1fc.tar.gz
(rmail-new-summary): Don't try to summarize an empty folder.
Diffstat (limited to 'lisp/mail/rmailsum.el')
-rw-r--r--lisp/mail/rmailsum.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 94cfa7b3df6..eb202721353 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -204,8 +204,9 @@ nil for FUNCTION means all messages."
(if (eq major-mode 'rmail-summary-mode)
(setq was-in-summary t))
(with-current-buffer rmail-buffer
- (setq mesg rmail-current-message
- rmail-summary-buffer (rmail-new-summary-1 desc redo func args)))
+ (if (zerop (setq mesg rmail-current-message))
+ (error "No messages to summarize"))
+ (setq rmail-summary-buffer (rmail-new-summary-1 desc redo func args)))
;; Now display the summary buffer and go to the right place in it.
(unless was-in-summary
(if (and (one-window-p)