message.el (message-bury): Revert 2013-03-18 change (Bug#14117)
authorGlenn Morris <rgm@gnu.org>
Fri, 26 Apr 2013 10:15:04 +0000 (10:15 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 26 Apr 2013 10:15:04 +0000 (10:15 +0000)
lisp/ChangeLog
lisp/message.el

index 36c9137..1cff54e 100644 (file)
@@ -1,3 +1,7 @@
+2013-04-26  Glenn Morris  <rgm@gnu.org>
+
+       * message.el (message-bury): Revert 2013-03-18 change.  (Bug#14117)
+
 2013-04-25  Andrew Cohen  <cohen@bu.edu>
 
        * gnus-msg.el (gnus-inews-insert-gcc): Re-order conditional to work for
index 1b82ad5..d87879b 100644 (file)
@@ -4141,9 +4141,11 @@ Instead, just auto-save the buffer and then bury it."
 
 (defun message-bury (buffer)
   "Bury this mail BUFFER."
-  (bury-buffer buffer)
-  (when message-return-action
-    (apply (car message-return-action) (cdr message-return-action))))
+  (if message-return-action
+      (progn
+        (bury-buffer buffer)
+        (apply (car message-return-action) (cdr message-return-action)))
+    (with-current-buffer buffer (bury-buffer))))
 
 (defun message-send (&optional arg)
   "Send the message in the current buffer.