From 0a3a94b3d28f55ceb4d443da17c00c9bda83eb4a Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Fri, 6 Jun 2008 08:01:29 +0000 Subject: [PATCH] (display-buffer): Remove dead call to get-lru-window. --- lisp/ChangeLog | 17 +++++++++++------ lisp/window.el | 6 ++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0540dab168..156e51b1b70 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-06-06 Martin Rudalics + + * window.el (display-buffer): Remove dead call to get-lru-window. + 2008-06-06 Stefan Monnier * mail/sendmail.el (mail-interactive): Change default. @@ -22,13 +26,14 @@ (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. diff --git a/lisp/window.el b/lisp/window.el index 3d2c02d7fc7..96511250ce0 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -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))))) -- 2.39.2