* mail/sendmail.el (mail-bury): Call return action with the right Rmail buffer.
authorChong Yidong <cyd@gnu.org>
Mon, 16 Apr 2012 10:11:45 +0000 (18:11 +0800)
committerChong Yidong <cyd@gnu.org>
Mon, 16 Apr 2012 10:11:45 +0000 (18:11 +0800)
Fixes: debbugs:11242

lisp/ChangeLog
lisp/mail/sendmail.el

index db55958..e1232eb 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-16  Chong Yidong  <cyd@gnu.org>
+
+       * mail/sendmail.el (mail-bury): Call return action with the right
+       Rmail buffer (Bug#11242).
+
 2012-04-15  Chong Yidong  <cyd@gnu.org>
 
        * server.el (server-process-filter): Handle corner case where both
index 933eaef..c4647d7 100644 (file)
@@ -864,7 +864,7 @@ Prefix arg means don't delete this window."
     (unless return-action
       (dolist (buffer (buffer-list))
        (if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode)
-           (setq return-action `(rmail-mail-return ,newbuf)))))
+           (setq return-action `(rmail-mail-return ,buffer)))))
     (if (and (null arg) return-action)
        (apply (car return-action) (cdr return-action))
       (switch-to-buffer newbuf))))