emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106486: Rmail trivia: give explicit


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106486: Rmail trivia: give explicit errors for empty folders.
Date: Tue, 22 Nov 2011 23:41:17 -0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106486
fixes bug(s): http://debbugs.gnu.org/10082
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2011-11-22 23:41:17 -0800
message:
  Rmail trivia: give explicit errors for empty folders.
  
  * mail/rmail.el (rmail-forward):
  * mail/rmailkwd.el (rmail-set-label):
  * mail/rmailout.el (rmail-output, rmail-output-as-seen)
  (rmail-output-body-to-file): Give error if no message.
modified:
  lisp/ChangeLog
  lisp/mail/rmail.el
  lisp/mail/rmailkwd.el
  lisp/mail/rmailout.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-11-23 07:31:39 +0000
+++ b/lisp/ChangeLog    2011-11-23 07:41:17 +0000
@@ -1,5 +1,10 @@
 2011-11-23  Glenn Morris  <address@hidden>
 
+       * mail/rmail.el (rmail-forward):
+       * mail/rmailkwd.el (rmail-set-label):
+       * mail/rmailout.el (rmail-output, rmail-output-as-seen)
+       (rmail-output-body-to-file): Give error if no message.  (Bug#10082)
+
        * mail/rmail.el (rmail-current-message): Doc fix.
 
        * mail/rmail.el (rmail-message-filter): Mark as obsolete.  (Bug#2624)

=== modified file 'lisp/mail/rmail.el'
--- a/lisp/mail/rmail.el        2011-11-23 07:31:39 +0000
+++ b/lisp/mail/rmail.el        2011-11-23 07:41:17 +0000
@@ -3786,6 +3786,8 @@
 With prefix argument, \"resend\" the message instead of forwarding it;
 see the documentation of `rmail-resend'."
   (interactive "P")
+  (if (zerop rmail-current-message)
+      (error "No message to forward"))
   (if resend
       (call-interactively 'rmail-resend)
     (let ((forward-buffer rmail-buffer)

=== modified file 'lisp/mail/rmailkwd.el'
--- a/lisp/mail/rmailkwd.el     2011-01-25 04:08:28 +0000
+++ b/lisp/mail/rmailkwd.el     2011-11-23 07:41:17 +0000
@@ -96,7 +96,8 @@
       (error "More than one label specified"))
   (with-current-buffer rmail-buffer
     (rmail-maybe-set-message-counters)
-    (or msg (setq msg rmail-current-message))
+    (if (zerop (or msg (setq msg rmail-current-message)))
+       (error "No message"))
     ;; Force recalculation of summary for this message.
     (aset rmail-summary-vector (1- msg) nil)
     (let (attr-index)

=== modified file 'lisp/mail/rmailout.el'
--- a/lisp/mail/rmailout.el     2011-11-15 00:34:01 +0000
+++ b/lisp/mail/rmailout.el     2011-11-23 07:41:17 +0000
@@ -468,6 +468,8 @@
       (if rmail-buffer
          (set-buffer rmail-buffer)
        (error "There is no Rmail buffer"))
+      (if (zerop rmail-total-messages)
+         (error "No messages to output"))
       (let ((orig-count count)
            beg end)
        (while (> count 0)
@@ -533,6 +535,8 @@
     (if rmail-buffer
        (set-buffer rmail-buffer)
       (error "There is no Rmail buffer"))
+    (if (zerop rmail-total-messages)
+       (error "No messages to output"))
     (let ((orig-count count)
          (cur (current-buffer)))
       (while (> count 0)
@@ -594,6 +598,8 @@
        (expand-file-name file-name
                          (and rmail-default-body-file
                               (file-name-directory rmail-default-body-file))))
+  (if (zerop rmail-current-message)
+      (error "No message to output"))
   (save-excursion
     (goto-char (point-min))
     (search-forward "\n\n")


reply via email to

[Prev in Thread] Current Thread [Next in Thread]