From: Martin Rudalics Date: Sat, 27 Aug 2011 08:38:33 +0000 (+0200) Subject: Fix bug in display-buffer-reuse-window (Bug#9381). X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~58 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=538a061c725a191b921055c87cc0c26f0bccd95f;p=emacs.git Fix bug in display-buffer-reuse-window (Bug#9381). * window.el (display-buffer-reuse-window): Fix case where selected window was reused with non-nil OTHER-WINDOW argument. (Bug#9381) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c5f19a5d1f4..93f7bd1a200 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-08-27 Martin Rudalics + + * window.el (display-buffer-reuse-window): Fix case where + selected window was reused with non-nil OTHER-WINDOW argument. + (Bug#9381) + 2011-08-27 Deniz Dogan * net/rcirc.el (rcirc-check-auth-status): Adding support for diff --git a/lisp/window.el b/lisp/window.el index e68af18ab8e..651e78bb419 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4761,7 +4761,9 @@ BUFFER, nil if none was found." (or (memq (window-parameter window 'window-side) '(nil none)) (eq window-buffer buffer)) - (or (not method-window) + (or (and (not method-window) + (or (not other-window) + (not (eq window (selected-window))))) (and (eq method-window 'same) (not other-window) (eq window (selected-window)))