Function: window--delete
window--delete is a byte-compiled function defined in window.el.gz.
Signature
(window--delete &optional WINDOW DEDICATED-ONLY KILL)
Documentation
Delete WINDOW if possible.
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 or its frame is auto-hidden.
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window--delete (&optional window dedicated-only kill)
"Delete WINDOW if possible.
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 or its frame is auto-hidden."
(setq window (window-normalize-window window t))
(unless (and dedicated-only (not (window-dedicated-p window)))
(let ((deletable (window-deletable-p window)))
(cond
((eq deletable 'frame)
(let ((frame (window-frame window)))
(cond
(kill
(delete-frame frame))
((functionp (frame-parameter frame 'auto-hide-function))
(funcall (frame-parameter frame 'auto-hide-function)))
((functionp frame-auto-hide-function)
(funcall frame-auto-hide-function frame))))
'frame)
(deletable
(delete-window window)
t)))))