From: yamaoka Date: Wed, 18 Nov 1998 08:15:41 +0000 (+0000) Subject: (message-mimic-kill-buffer): Rewrite. X-Git-Tag: pgnus-ichikawa-199811302358~28 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7c5f4643ff485a8f69b274408b711a67ec32e172;p=elisp%2Fgnus.git- (message-mimic-kill-buffer): Rewrite. --- diff --git a/lisp/message.el b/lisp/message.el index 5c87339..a79778f 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -2174,15 +2174,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."