From: Richard M. Stallman Date: Mon, 20 Sep 2004 16:28:51 +0000 (+0000) Subject: (rmail-edit-current-message): Immediate error if file is empty. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=41bd42bf6afd08b63fb7d9e8e7cbba9ab30ed877;p=emacs.git (rmail-edit-current-message): Immediate error if file is empty. --- diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 0054b0d6922..3cdf12d78f3 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el @@ -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)