From: Richard M. Stallman Date: Fri, 10 Jun 1994 20:20:53 +0000 (+0000) Subject: (mail-bury): If showing rmail buffer that has summary, show the summary too. X-Git-Tag: emacs-19.34~8020 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fdb90184f655ea8f15229fe5c6c31ca0ea4abf2d;p=emacs.git (mail-bury): If showing rmail buffer that has summary, show the summary too. --- diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 422a42d2bf8..473504e2e3b 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -324,13 +324,22 @@ Prefix arg means don't delete this window." (cdr (assq 'dedicated (frame-parameters))) (not (null (delq (selected-frame) (visible-frame-list))))) (delete-frame (selected-frame)) - (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 newbuf))))) + (let (rmail-flag summary-buffer) + (and (not arg) + (not (one-window-p)) + (save-excursion + (set-buffer (window-buffer (next-window (selected-window) 'not))) + (setq rmail-flag (eq major-mode 'rmail-mode)) + (setq summary-buffer + (and rmail-summary-buffer + (buffer-name rmail-summary-buffer) + (not (get-buffer-window rmail-summary-buffer)) + rmail-summary-buffer)))) + (if rmail-flag + ;; If the Rmail buffer has a summary, show that. + (if summary-buffer (switch-to-buffer summary-buffer) + (delete-window)) + (switch-to-buffer newbuf)))))) (defun mail-send () "Send the message in the current buffer.