changeset 106370:1656b89c39bf

(rmail-pop-to-buffer): New function. (Bug#2282) (rmail-select-summary): Use rmail-pop-to-buffer.
author Glenn Morris <rgm@gnu.org>
date Wed, 02 Dec 2009 03:04:43 +0000
parents 74b7ca95d469
children 089e310803a4
files lisp/ChangeLog lisp/mail/rmail.el
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Dec 02 03:03:48 2009 +0000
+++ b/lisp/ChangeLog	Wed Dec 02 03:04:43 2009 +0000
@@ -1,5 +1,8 @@
 2009-12-02  Glenn Morris  <rgm@gnu.org>
 
+	* mail/rmail.el (rmail-pop-to-buffer): New function.  (Bug#2282)
+	(rmail-select-summary): Use rmail-pop-to-buffer.
+
 	* calendar/diary-lib.el (diary-list-entries): Replace superfluous
 	save-excursion with save-current-buffer.
 	Widen before searching.  (Bug#5093)
--- a/lisp/mail/rmail.el	Wed Dec 02 03:03:48 2009 +0000
+++ b/lisp/mail/rmail.el	Wed Dec 02 03:04:43 2009 +0000
@@ -792,6 +792,12 @@
 	      . '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 @@
 	   (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