]> git.eshelyaron.com Git - emacs.git/commitdiff
(window--splittable-p, window--try-to-split-window):
authorMartin Rudalics <rudalics@gmx.at>
Tue, 10 Jun 2008 07:45:23 +0000 (07:45 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Tue, 10 Jun 2008 07:45:23 +0000 (07:45 +0000)
Don't use with-selected-window to avoid messing up get-lru-window.

lisp/ChangeLog
lisp/window.el

index 4e182d9809c9fa045162b0288ef51ba719b4bc96..b063c60e11babfbc2ba3d283db12bf55c7a0f9f4 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-10  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (window--splittable-p, window--try-to-split-window):
+       Don't use with-selected-window to avoid messing up get-lru-window.
+
 2008-06-10  Glenn Morris  <rgm@gnu.org>
 
        * subr.el (locate-library): Doc fix.
index 74c7a366f0f7a1d82c63ff9ec8c1222dcbca0e00..3cdc99e2651f46b9783f8a459b0ebc78db0b57bc 100644 (file)
@@ -806,7 +806,7 @@ hold:
 - When WINDOW is split evenly, the emanating windows are at least
   `window-min-width' or two (whichever is larger) columns wide."
   (when (window-live-p window)
-    (with-selected-window window
+    (with-current-buffer (window-buffer window)
       (if horizontal
          ;; A window can be split horizontally when its width is not
          ;; fixed, it is at least `split-width-threshold' columns wide
@@ -847,11 +847,11 @@ by `split-window' or `split-window-preferred-function'."
          (and (window--splittable-p window t)
               ;; Split window horizontally.
               (split-window window nil t))
-         (and (with-selected-window window
-                (one-window-p 'nomini))
-              ;; If WINDOW is the only window on its frame, attempt to
-              ;; split it vertically disregarding the current value of
-              ;; `split-height-threshold'.
+         (and (eq window (frame-root-window (window-frame window)))
+              (not (window-minibuffer-p window))
+              ;; If WINDOW is the only window on its frame and not the
+              ;; minibuffer window, attempt to split it vertically
+              ;; disregarding the value of `split-height-threshold'.
               (let ((split-height-threshold 0))
                 (window--splittable-p window)
                 (split-window window)))))))
@@ -1013,7 +1013,7 @@ consider all visible or iconified frames."
                    (setq frame-to-use (last-nonminibuffer-frame))
                    (window--frame-usable-p frame-to-use)
                    (not (frame-parameter frame-to-use 'unsplittable))))
-          ;; Attempt to split largest or most recently used window.
+          ;; Attempt to split largest or least recently used window.
           (setq window-to-use
                 (or (window--try-to-split-window
                      (get-largest-window frame-to-use t))