message.el (message-bury): Minor cleanup
authorSam Steingold <sds@gnu.org>
Mon, 18 Mar 2013 22:47:51 +0000 (22:47 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 18 Mar 2013 22:47:51 +0000 (22:47 +0000)
lisp/ChangeLog
lisp/message.el

index e94f2e1..7b64cec 100644 (file)
@@ -1,3 +1,7 @@
+2013-03-18  Sam Steingold  <sds@gnu.org>
+
+       * message.el (message-bury): Minor cleanup.
+
 2013-03-07  Paul Eggert  <eggert@cs.ucla.edu>
 
        * gnus-cite.el: Specify utf-8, not iso-8859-1, for ASCII file.
index d87879b..1b82ad5 100644 (file)
@@ -4141,11 +4141,9 @@ Instead, just auto-save the buffer and then bury it."
 
 (defun message-bury (buffer)
   "Bury this mail BUFFER."
-  (if message-return-action
-      (progn
-        (bury-buffer buffer)
-        (apply (car message-return-action) (cdr message-return-action)))
-    (with-current-buffer buffer (bury-buffer))))
+  (bury-buffer buffer)
+  (when message-return-action
+    (apply (car message-return-action) (cdr message-return-action))))
 
 (defun message-send (&optional arg)
   "Send the message in the current buffer.