From c920f2224517843a163dcfedcca1d548de2808b9 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 2 Dec 2009 03:04:43 +0000 Subject: (rmail-pop-to-buffer): New function. (Bug#2282) (rmail-select-summary): Use rmail-pop-to-buffer. --- lisp/mail/rmail.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lisp/mail/rmail.el') diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index fba9f1c175c..e21b3ed1efc 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -792,6 +792,12 @@ that knows the exact ordering of the \\( \\) subexpressions.") . 'rmail-header-name)))) "Additional expressions to highlight in Rmail mode.") +;; Rmail does not expect horizontal splitting. (Bug#2282) +(defun rmail-pop-to-buffer (&rest args) + "Like `pop-to-buffer', but with `split-width-threshold' set to nil." + (let (split-width-threshold) + (apply 'pop-to-buffer args))) + ;; Perform BODY in the summary buffer ;; in such a way that its cursor is properly updated in its own window. (defmacro rmail-select-summary (&rest body) @@ -801,7 +807,7 @@ that knows the exact ordering of the \\( \\) subexpressions.") (save-excursion (unwind-protect (progn - (pop-to-buffer rmail-summary-buffer) + (rmail-pop-to-buffer rmail-summary-buffer) ;; rmail-total-messages is a buffer-local var ;; in the rmail buffer. ;; This way we make it available for the body -- cgit v1.2.1