changeset 101701:ba9c16ff3497

(rmail-new-summary): Don't try to summarize an empty folder.
author Glenn Morris <rgm@gnu.org>
date Sat, 31 Jan 2009 03:15:35 +0000
parents 644f9b8a72bc
children 832fdb28f500
files lisp/ChangeLog lisp/mail/rmailsum.el
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Jan 31 02:57:13 2009 +0000
+++ b/lisp/ChangeLog	Sat Jan 31 03:15:35 2009 +0000
@@ -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
--- a/lisp/mail/rmailsum.el	Sat Jan 31 02:57:13 2009 +0000
+++ b/lisp/mail/rmailsum.el	Sat Jan 31 03:15:35 2009 +0000
@@ -204,8 +204,9 @@
     (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)