Function: mouse-delete-window
mouse-delete-window is an interactive and byte-compiled function
defined in mouse.el.gz.
Signature
(mouse-delete-window CLICK)
Documentation
Delete the window you click on.
Do nothing if the frame has just one window. This command must be bound to a mouse click.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mouse.el.gz
(defun mouse-delete-window (click)
"Delete the window you click on.
Do nothing if the frame has just one window.
This command must be bound to a mouse click."
(interactive "e")
(unless (one-window-p t)
(mouse-minibuffer-check click)
;; Only delete the window if the user hasn't moved point out of
;; the mode line before releasing the button.
(when (and (eq (posn-area (event-end click))
'mode-line)
(eq (posn-window (event-end click))
(posn-window (event-start click))))
(delete-window (posn-window (event-start click))))))