summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2012-12-28 11:24:04 +0100
committerMartin Rudalics <rudalics@gmx.at>2012-12-28 11:24:04 +0100
commit7c3e220a6e0d6775080d8eb382a629b1e237a058 (patch)
tree1ec2e530525ab6ca36dcd2b1f96cff64e8c33acc /lisp/mail
parent361828b5dbb00fc562c3349870cc29e5ea354f4d (diff)
downloademacs-7c3e220a6e0d6775080d8eb382a629b1e237a058.tar.gz
Rewrite rmail-maybe-display-summary (Bug#13066).
* mail/rmail.el (rmail-maybe-display-summary): Rewrite (Bug#13066).
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmail.el28
1 files changed, 7 insertions, 21 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 9c48788553b..dbda8a6e26d 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4224,31 +4224,17 @@ This has an effect only if a summary buffer exists."
;; Put the summary buffer back on the screen, if user wants that.
(defun rmail-maybe-display-summary ()
- (let ((selected (selected-window))
- (buffer (current-buffer))
- window)
+ (let (window size)
;; If requested, make sure the summary is displayed.
(and rmail-summary-buffer (buffer-name rmail-summary-buffer)
rmail-redisplay-summary
- (if (get-buffer-window rmail-summary-buffer 0)
- ;; It's already in some frame; show that one.
- (let ((frame (window-frame
- (get-buffer-window rmail-summary-buffer 0))))
- (make-frame-visible frame)
- (raise-frame frame))
- (display-buffer rmail-summary-buffer)))
- ;; If requested, set the height of the summary window.
- (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
+ (setq window
+ (display-buffer
+ rmail-summary-buffer '(nil (reusable-frames . visible))))
rmail-summary-window-size
- (setq window (get-buffer-window rmail-summary-buffer))
- ;; Don't try to change the size if just one window in frame.
- (not (eq window (frame-root-window (window-frame window))))
- (unwind-protect
- (progn
- (select-window window)
- (enlarge-window (- rmail-summary-window-size (window-height))))
- (select-window selected)
- (set-buffer buffer)))))
+ (setq size (- rmail-summary-window-size (window-height window)))
+ (window--resizable-p window size)
+ (window-resize window size))))
;;;; *** Rmail Local Fontification ***