]> git.eshelyaron.com Git - emacs.git/commitdiff
(display-buffer): Remove dead call to get-lru-window.
authorMartin Rudalics <rudalics@gmx.at>
Fri, 6 Jun 2008 08:01:29 +0000 (08:01 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Fri, 6 Jun 2008 08:01:29 +0000 (08:01 +0000)
lisp/ChangeLog
lisp/window.el

index f0540dab168560da91853c47bfd5b84838715fef..156e51b1b70192e98f0e84bf22c13702a8b3762e 100644 (file)
@@ -1,3 +1,7 @@
+2008-06-06  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (display-buffer): Remove dead call to get-lru-window.
+
 2008-06-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * mail/sendmail.el (mail-interactive): Change default.
        (special-display-buffer-names, special-display-regexps)
        (special-display-function, same-window-p, same-window-buffer-names)
        (same-window-regexps, pop-up-frames, display-buffer-reuse-frames)
-       (pop-up-frame-function, pop-up-windows)
+       (pop-up-frame-function, pop-up-windows, even-window-heights)
        (split-window-preferred-function, split-height-threshold)
-       (split-width-threshold, window--splittable-p)
-       (window--try-to-split-window, window--frame-usable-p)
-       (even-window-heights, window--even-window-heights)
-       (window--display-buffer-1, window--display-buffer-2, display-buffer)
-       (pop-to-buffer): Move from window.c and buffer.c.
+       (window--display-buffer-1, display-buffer, pop-to-buffer): Move
+       from window.c and buffer.c.
+       (window--splittable-p, window--try-to-split-window)
+       (window--frame-usable-p, window--display-buffer-2)
+       (window--even-window-heights): New functions.
+       (split-width-threshold): New option.
        (split-window-preferred-horizontally): Remove.
        * cus-start.el: Remove corresponding declarations.
 
index 3d2c02d7fc784f437bf1607fec21023ab26605f2..96511250ce01045ea061d79fb8764d37c944a786 100644 (file)
@@ -849,6 +849,9 @@ returned by `split-window' or `split-window-preferred-function'."
 (defun window--frame-usable-p (frame)
   "Return frame FRAME if it can be used to display another buffer."
   (let ((window (frame-root-window frame)))
+    ;; `frame-root-window' may be an internal window which is considered
+    ;; "dead" by `window-live-p'.  Hence if `window' is not live we
+    ;; implicitly know that `frame' has a visible window we can use.
     (when (or (not (window-live-p window))
              (and (not (window-minibuffer-p window))
                   (not (window-dedicated-p window))))
@@ -1012,8 +1015,7 @@ consider all visible or iconified frames."
                (get-largest-window 'visible nil)
                (get-buffer-window buffer 0)
                (get-largest-window 0 nil)
-               (frame-selected-window (funcall pop-up-frame-function))
-               (get-lru-window t t)))
+               (frame-selected-window (funcall pop-up-frame-function))))
       (window--even-window-heights window-to-use)
       (window--display-buffer-2 buffer window-to-use)))))