From 658d8de8c85604c7f879182c32178709b0b91b39 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 18 Nov 1998 08:14:38 +0000 Subject: [PATCH] (message-mimic-kill-buffer): Rewrite. --- lisp/message.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/message.el b/lisp/message.el index b753274..8e4560c 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1998,15 +1998,15 @@ The text will also be indented the normal way." (defun message-mimic-kill-buffer () "Kill the current buffer with query." (interactive) - (if (buffer-modified-p) - (message-kill-buffer) - (let ((command this-command) - (bufname (read-buffer (format "Kill buffer: (default %s) " - (buffer-name))))) - (if (or (not bufname) - (string-equal bufname (buffer-name))) - (message-kill-buffer) - (message "%s must be invoked only for the current buffer." command))))) + (unless (eq 'message-mode major-mode) + (error "%s must be invoked from a message buffer." this-command)) + (let ((command this-command) + (bufname (read-buffer (format "Kill buffer: (default %s) " + (buffer-name))))) + (if (or (not bufname) + (string-equal bufname (buffer-name))) + (message-kill-buffer) + (message "%s must be invoked only for the current buffer." command)))) (defun message-delete-frame (frame org-frame) "Delete frame for editing message." -- 1.7.10.4