aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2008-06-10 07:45:23 +0000
committerMartin Rudalics2008-06-10 07:45:23 +0000
commit71b50c9351b445b7d2d7eae0c9cfe906532fcdb6 (patch)
tree16f4306a535dae29ab44056ebd1342c05d1f5257
parentfaeb9c70aeb74dc9b27a40c2d3b158e01b9e1235 (diff)
downloademacs-71b50c9351b445b7d2d7eae0c9cfe906532fcdb6.tar.gz
emacs-71b50c9351b445b7d2d7eae0c9cfe906532fcdb6.zip
(window--splittable-p, window--try-to-split-window):
Don't use with-selected-window to avoid messing up get-lru-window.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/window.el14
2 files changed, 12 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4e182d9809c..b063c60e11b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12008-06-10 Martin Rudalics <rudalics@gmx.at>
2
3 * window.el (window--splittable-p, window--try-to-split-window):
4 Don't use with-selected-window to avoid messing up get-lru-window.
5
12008-06-10 Glenn Morris <rgm@gnu.org> 62008-06-10 Glenn Morris <rgm@gnu.org>
2 7
3 * subr.el (locate-library): Doc fix. 8 * subr.el (locate-library): Doc fix.
diff --git a/lisp/window.el b/lisp/window.el
index 74c7a366f0f..3cdc99e2651 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -806,7 +806,7 @@ hold:
806- When WINDOW is split evenly, the emanating windows are at least 806- When WINDOW is split evenly, the emanating windows are at least
807 `window-min-width' or two (whichever is larger) columns wide." 807 `window-min-width' or two (whichever is larger) columns wide."
808 (when (window-live-p window) 808 (when (window-live-p window)
809 (with-selected-window window 809 (with-current-buffer (window-buffer window)
810 (if horizontal 810 (if horizontal
811 ;; A window can be split horizontally when its width is not 811 ;; A window can be split horizontally when its width is not
812 ;; fixed, it is at least `split-width-threshold' columns wide 812 ;; fixed, it is at least `split-width-threshold' columns wide
@@ -847,11 +847,11 @@ by `split-window' or `split-window-preferred-function'."
847 (and (window--splittable-p window t) 847 (and (window--splittable-p window t)
848 ;; Split window horizontally. 848 ;; Split window horizontally.
849 (split-window window nil t)) 849 (split-window window nil t))
850 (and (with-selected-window window 850 (and (eq window (frame-root-window (window-frame window)))
851 (one-window-p 'nomini)) 851 (not (window-minibuffer-p window))
852 ;; If WINDOW is the only window on its frame, attempt to 852 ;; If WINDOW is the only window on its frame and not the
853 ;; split it vertically disregarding the current value of 853 ;; minibuffer window, attempt to split it vertically
854 ;; `split-height-threshold'. 854 ;; disregarding the value of `split-height-threshold'.
855 (let ((split-height-threshold 0)) 855 (let ((split-height-threshold 0))
856 (window--splittable-p window) 856 (window--splittable-p window)
857 (split-window window))))))) 857 (split-window window)))))))
@@ -1013,7 +1013,7 @@ consider all visible or iconified frames."
1013 (setq frame-to-use (last-nonminibuffer-frame)) 1013 (setq frame-to-use (last-nonminibuffer-frame))
1014 (window--frame-usable-p frame-to-use) 1014 (window--frame-usable-p frame-to-use)
1015 (not (frame-parameter frame-to-use 'unsplittable)))) 1015 (not (frame-parameter frame-to-use 'unsplittable))))
1016 ;; Attempt to split largest or most recently used window. 1016 ;; Attempt to split largest or least recently used window.
1017 (setq window-to-use 1017 (setq window-to-use
1018 (or (window--try-to-split-window 1018 (or (window--try-to-split-window
1019 (get-largest-window frame-to-use t)) 1019 (get-largest-window frame-to-use t))