Commit b0f3a26b authored by Jim Blandy's avatar Jim Blandy

* mouse.el (mouse-tear-off-window): New function.

parent 652ccd35
......@@ -84,6 +84,16 @@ This must be bound to a mouse click."
(interactive "e")
(delete-window (posn-window (event-start click))))
(defun mouse-tear-off-window (click)
"Delete the window clicked on, and create a new frame displaying its buffer."
(interactive "e")
(let* ((window (posn-window (event-start click)))
(buf (window-buffer window))
(frame (new-frame)))
(select-frame frame)
(switch-to-buffer buf)
(delete-window window)))
(defun mouse-delete-other-windows ()
"Delete all window except the one you click on."
(interactive "@")
......
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