From: Richard M. Stallman Date: Sat, 30 Jul 1994 07:46:42 +0000 (+0000) Subject: (rmail-new-summary): If just one window, X-Git-Tag: emacs-19.34~7468 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f4e31a29f3ab3ca749764a295dded3647c380e8;p=emacs.git (rmail-new-summary): If just one window, put the summary in the upper window and Rmail buffer below. --- diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index e5f76821721..985ae19c2bf 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -198,7 +198,17 @@ nil for FUNCTION means all messages." (setq rmail-summary-buffer sumbuf)) ;; Now display the summary buffer and go to the right place in it. (or was-in-summary - (pop-to-buffer sumbuf)) + (if (one-window-p) + ;; If there is just one window, put the summary on the top. + (progn + (split-window) + (select-window (next-window (frame-first-window))) + (pop-to-buffer sumbuf) + ;; If pop-to-buffer did not use that window, delete that + ;; window. (This can happen if it uses another frame.) + (if (not (eq sumbuf (window-buffer (frame-first-window)))) + (delete-other-windows))) + (pop-to-buffer sumbuf))) (rmail-summary-goto-msg mesg t t) (message "Computing summary lines...done")))