aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1992-07-21 02:48:51 +0000
committerRichard M. Stallman <[email protected]>1992-07-21 02:48:51 +0000
commit0b0ef30f7987eb125e05d0a653036cd7f58a6c43 (patch)
tree3f023c6b304dc1791aa41bc796ad6fad45cd9048 /lisp
parent9ef8b0d6a424575e33df63eabfa48ab8f503e417 (diff)
*** empty log message ***
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mail/sendmail.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index e775685ca7..b976cb3985 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -194,9 +194,13 @@ Prefix arg means don't delete this window."
(interactive "P")
(mail-send)
(bury-buffer (current-buffer))
- (if (or (one-window-p) arg)
- (switch-to-buffer (other-buffer (current-buffer)))
- (delete-window)))
+ (if (and (not arg)
+ (not (one-window-p))
+ (save-excursion
+ (set-buffer (window-buffer (next-window (selected-window) 'not)))
+ (eq major-mode 'rmail-mode)))
+ (delete-window)
+ (switch-to-buffer (other-buffer (current-buffer)))))
(defun mail-send ()
"Send the message in the current buffer.