aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2011-06-22 19:39:29 -0400
committerRichard M. Stallman2011-06-22 19:39:29 -0400
commit50718fc219ea1759e1315efbd693c03a4ea019c7 (patch)
tree72c332e753c1290709fd9d8cdf1c0f9819fa427e
parent7a70468fb18a3e54f3ae026143d01ac4ca0fcac2 (diff)
downloademacs-50718fc219ea1759e1315efbd693c03a4ea019c7.tar.gz
emacs-50718fc219ea1759e1315efbd693c03a4ea019c7.zip
Make mail exit more nicely when Rmail is in use.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/mail/sendmail.el14
2 files changed, 14 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 049c3d2e0e0..89b33dc7a62 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12011-06-22 Richard Stallman <rms@gnu.org> 12011-06-22 Richard Stallman <rms@gnu.org>
2 2
3 * mail/sendmail.el (mail-bury): If Rmail is in use, return nicely
4 to Rmail even if not started by a special Rmail command.
5
3 * mail/rmailmm.el (rmail-insert-mime-forwarded-message): 6 * mail/rmailmm.el (rmail-insert-mime-forwarded-message):
4 Copy the buffer currently showing just one message. 7 Copy the buffer currently showing just one message.
5 8
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index f4ef9b91903..c1405ec5ff3 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -806,10 +806,18 @@ Prefix arg means don't delete this window."
806 806
807(defun mail-bury (&optional arg) 807(defun mail-bury (&optional arg)
808 "Bury this mail buffer." 808 "Bury this mail buffer."
809 (let ((newbuf (other-buffer (current-buffer)))) 809 (let ((newbuf (other-buffer (current-buffer)))
810 (return-action mail-return-action)
811 some-rmail)
810 (bury-buffer (current-buffer)) 812 (bury-buffer (current-buffer))
811 (if (and (null arg) mail-return-action) 813 ;; If there is an Rmail buffer, return to it nicely
812 (apply (car mail-return-action) (cdr mail-return-action)) 814 ;; even if this message was not started by an Rmail command.
815 (unless return-action
816 (dolist (buffer (buffer-list))
817 (if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode)
818 (setq return-action `(rmail-mail-return ,newbuf)))))
819 (if (and (null arg) return-action)
820 (apply (car return-action) (cdr return-action))
813 (switch-to-buffer newbuf)))) 821 (switch-to-buffer newbuf))))
814 822
815(defcustom mail-send-hook nil 823(defcustom mail-send-hook nil