From 41bd42bf6afd08b63fb7d9e8e7cbba9ab30ed877 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 20 Sep 2004 16:28:51 +0000 Subject: [PATCH] (rmail-edit-current-message): Immediate error if file is empty. --- lisp/mail/rmailedit.el | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.39.2