changeset 1421:a8378792a31d

* mouse.el (mouse-tear-off-window): New function.
author Jim Blandy <jimb@redhat.com>
date Sat, 17 Oct 1992 21:57:45 +0000
parents 4005f73e5712
children f52113454d04
files lisp/mouse.el
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Sat Oct 17 07:07:39 1992 +0000
+++ b/lisp/mouse.el	Sat Oct 17 21:57:45 1992 +0000
@@ -84,6 +84,16 @@
   (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 "@")