mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-26 10:49:33 +00:00
* mouse.el (mouse-tear-off-window): New function.
This commit is contained in:
parent
652ccd357d
commit
b0f3a26ba8
@ -84,6 +84,16 @@ This must be bound to a mouse click."
|
|||||||
(interactive "e")
|
(interactive "e")
|
||||||
(delete-window (posn-window (event-start click))))
|
(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 ()
|
(defun mouse-delete-other-windows ()
|
||||||
"Delete all window except the one you click on."
|
"Delete all window except the one you click on."
|
||||||
(interactive "@")
|
(interactive "@")
|
||||||
|
Loading…
Reference in New Issue
Block a user