From: Troels Nielsen Date: Tue, 29 May 2012 12:22:49 +0000 (+0800) Subject: Fix active minibuffer case for window-deletable-p. X-Git-Tag: emacs-24.2.90~471^2~6^2~55 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=46b7967e4d98570501f5e75ba7460fa4c79e4617;p=emacs.git Fix active minibuffer case for window-deletable-p. * window.el (window-deletable-p): Avoid deleting the root window of a frame with an active minibuffer. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a98bdda3526..fbb398335d8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-05-29 Troels Nielsen + + * window.el (window-deletable-p): Avoid deleting the root window + of a frame with an active minibuffer. + 2012-05-29 Martin Rudalics * simple.el (choose-completion): Use quit-window (Bug#11567). diff --git a/lisp/window.el b/lisp/window.el index a650c5602ba..52b0a31e241 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2370,8 +2370,11 @@ frame." (cond ((frame-root-window-p window) ;; WINDOW's frame can be deleted only if there are other frames - ;; on the same terminal. - (unless (eq frame (next-frame frame 0)) + ;; on the same terminal, and it does not contain the active + ;; minibuffer. + (unless (or (eq frame (next-frame frame 0)) + (let ((minibuf (active-minibuffer-window))) + (and minibuf (eq frame (window-frame minibuf))))) 'frame)) ((or ignore-window-parameters (not (eq (window-parameter window 'window-side) 'none))