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.
This commit is contained in:
Troels Nielsen 2012-05-29 20:22:49 +08:00 committed by Chong Yidong
parent 69d565e2c2
commit 46b7967e4d
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2012-05-29 Troels Nielsen <bn.troels@gmail.com>
* window.el (window-deletable-p): Avoid deleting the root window
of a frame with an active minibuffer.
2012-05-29 Martin Rudalics <rudalics@gmx.at>
* simple.el (choose-completion): Use quit-window (Bug#11567).

View file

@ -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))