changeset 88142:d0cc7165afcf

(rmail-edit-current-message): Immediate error if file is empty.
author Richard M. Stallman <rms@gnu.org>
date Mon, 20 Sep 2004 16:28:51 +0000
parents 71b644d983a9
children 98286f19a872
files lisp/mail/rmailedit.el
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailedit.el	Mon Sep 20 16:28:13 2004 +0000
+++ b/lisp/mail/rmailedit.el	Mon Sep 20 16:28:51 2004 +0000
@@ -85,6 +85,8 @@
 (defun rmail-edit-current-message ()
   "Edit the contents of this message."
   (interactive)
+  (if (= rmail-total-messages 0)
+      (error "No messages in this file"))
   (make-local-variable 'rmail-old-pruned)
   (setq rmail-old-pruned (rmail-msg-is-pruned))
   (make-local-variable 'rmail-edit-saved-coding-system)