Commit c557cd6b authored by Martin Rudalics's avatar Martin Rudalics
Browse files

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)
parent 7061c986
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> 2011-10-08 Thierry Volpiatto <thierry.volpiatto@gmail.com>
* lisp/eshell/eshell.el (eshell-command): Avoid using hooks. * lisp/eshell/eshell.el (eshell-command): Avoid using hooks.
......
...@@ -2780,7 +2780,7 @@ WINDOW must be a live window and defaults to the selected one. ...@@ -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 Optional argument DEDICATED-ONLY non-nil means to delete WINDOW
only if it's dedicated to its buffer. Optional argument KILL only if it's dedicated to its buffer. Optional argument KILL
means the buffer shown in window will be killed. Return non-nil 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)) (setq window (window-normalize-live-window window))
(unless (and dedicated-only (not (window-dedicated-p window))) (unless (and dedicated-only (not (window-dedicated-p window)))
(let* ((buffer (window-buffer window)) (let* ((buffer (window-buffer window))
...@@ -2788,8 +2788,11 @@ if WINDOW gets deleted." ...@@ -2788,8 +2788,11 @@ if WINDOW gets deleted."
(cond (cond
((eq deletable 'frame) ((eq deletable 'frame)
(let ((frame (window-frame window))) (let ((frame (window-frame window)))
(when (functionp frame-auto-hide-function) (cond
(funcall frame-auto-hide-function frame))) (kill
(delete-frame frame))
((functionp frame-auto-hide-function)
(funcall frame-auto-hide-function frame))))
'frame) 'frame)
(deletable (deletable
(delete-window window) (delete-window window)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment