From a0c859f0436a217b7d30f688e1dfb77d57e11555 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Mon, 17 Nov 2008 09:58:50 +0000 Subject: [PATCH] (quit-window): Bind window to selected window when trying to delete it. --- lisp/ChangeLog | 5 +++++ lisp/window.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 76530d7150a..1aabd100644 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-11-17 Martin Rudalics + + * window.el (quit-window): Bind window to selected window when + trying to delete it. + 2008-11-17 Glenn Morris * progmodes/cc-defs.el (c-put-char-property-fun): Add fallback diff --git a/lisp/window.el b/lisp/window.el index 2dece4b25fe..8657842cfb8 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -1437,7 +1437,8 @@ Otherwise, bury WINDOW's buffer, see `bury-buffer'." (window-dedicated-p window)) ;; WINDOW is either non-nil, a minibuffer window, or dedicated; ;; try to delete it. - (let ((frame (window-frame (or window (selected-window))))) + (let* ((window (or window (selected-window))) + (frame (window-frame window))) (if (eq window (frame-root-window frame)) ;; WINDOW is alone on its frame. `delete-windows-on' ;; knows how to handle that case. -- 2.11.4.GIT