]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-new-summary): Don't try to summarize an empty folder.
authorGlenn Morris <rgm@gnu.org>
Sat, 31 Jan 2009 03:15:35 +0000 (03:15 +0000)
committerGlenn Morris <rgm@gnu.org>
Sat, 31 Jan 2009 03:15:35 +0000 (03:15 +0000)
lisp/ChangeLog
lisp/mail/rmailsum.el

index bcaa546ad755c9fc52066b7209cdbe1613841700..338a9eb23ef174a3f86bda797cffc6a41dcf52d7 100644 (file)
@@ -1,5 +1,8 @@
 2009-01-31  Glenn Morris  <rgm@gnu.org>
 
+       * mail/rmailsum.el (rmail-new-summary): Don't try to summarize an empty
+       folder.
+
        * mail/rmail.el (rmail-msg-is-pruned): New function.
        (rmail-toggle-header): Doc fix.  Use rmail-msg-is-pruned.
        (rmail-reply): Set up to yank from the decoded message rather than the
index 94cfa7b3df62d630dd4d5c0e2df2b67052571f0b..eb20272135373ee9e7afa6e4a646357ae2bd9234 100644 (file)
@@ -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)