]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-pop-to-buffer): New function. (Bug#2282)
authorGlenn Morris <rgm@gnu.org>
Wed, 2 Dec 2009 03:04:43 +0000 (03:04 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 2 Dec 2009 03:04:43 +0000 (03:04 +0000)
(rmail-select-summary): Use rmail-pop-to-buffer.

lisp/ChangeLog
lisp/mail/rmail.el

index 36bf1cb1476742150dbc3578c5049913fb315abf..47e7fb22f799385d1b3d19b5b5a4397b17e8664c 100644 (file)
@@ -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)
index fba9f1c175cec23637d7a083b507886b192b9ba6..e21b3ed1efc31a64c15a58a3190869111db533ad 100644 (file)
@@ -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