From: Martin Rudalics Date: Mon, 17 Nov 2008 09:58:50 +0000 (+0000) Subject: (quit-window): Bind window to selected window when X-Git-Tag: emacs-pretest-23.0.90~1746 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a0c859f0436a217b7d30f688e1dfb77d57e11555;p=emacs.git (quit-window): Bind window to selected window when trying to delete it. --- 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.