1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-01 11:14:55 +00:00

Delete dedicated frame when killing its buffer. (Bug#9699)

* window.el (window--delete): Delete dedicated frame unconditionally
when argument KILL is non-nil.  (Bug#9699)
This commit is contained in:
Martin Rudalics 2011-10-08 15:52:16 +02:00
parent 7061c98630
commit c557cd6b97
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2011-10-08 Martin Rudalics <rudalics@gmx.at>
* window.el (window--delete): Delete dedicated frame
unconditionally when argument KILL is non-nil. (Bug#9699)
2011-10-08 Thierry Volpiatto <thierry.volpiatto@gmail.com>
* lisp/eshell/eshell.el (eshell-command): Avoid using hooks.

View File

@ -2780,7 +2780,7 @@ WINDOW must be a live window and defaults to the selected one.
Optional argument DEDICATED-ONLY non-nil means to delete WINDOW
only if it's dedicated to its buffer. Optional argument KILL
means the buffer shown in window will be killed. Return non-nil
if WINDOW gets deleted."
if WINDOW gets deleted or its frame is auto-hidden."
(setq window (window-normalize-live-window window))
(unless (and dedicated-only (not (window-dedicated-p window)))
(let* ((buffer (window-buffer window))
@ -2788,8 +2788,11 @@ if WINDOW gets deleted."
(cond
((eq deletable 'frame)
(let ((frame (window-frame window)))
(when (functionp frame-auto-hide-function)
(funcall frame-auto-hide-function frame)))
(cond
(kill
(delete-frame frame))
((functionp frame-auto-hide-function)
(funcall frame-auto-hide-function frame))))
'frame)
(deletable
(delete-window window)