2011-11-23 Glenn Morris <rgm@gnu.org>
+ * 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)
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)
(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)
(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)
(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)
(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")