]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-edit-current-message): Immediate error if file is empty.
authorRichard M. Stallman <rms@gnu.org>
Mon, 20 Sep 2004 16:28:51 +0000 (16:28 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 20 Sep 2004 16:28:51 +0000 (16:28 +0000)
lisp/mail/rmailedit.el

index 0054b0d692296ce7d7bd85d953b104cefe78ec4e..3cdf12d78f37f3ef5ce3da2c9034db90ca135db6 100644 (file)
@@ -85,6 +85,8 @@ This functions runs the normal hook `rmail-edit-mode-hook'.
 (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)