summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-07-20 21:38:21 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-07-20 21:38:21 -0400
commit5bfcb88ced494a272045da30891cacc838276bd7 (patch)
tree20d5f99757f4a7b884a2259ebe0cfbfbe0603221 /lisp/mouse.el
parent4ce2720e1c097efb497d9f142901402d3cbb5f25 (diff)
downloademacs-5bfcb88ced494a272045da30891cacc838276bd7.tar.gz
* lisp/mouse.el (tear-off-window): Rename from mouse-tear-off-window since
it also makes sense to bind it to a non-mouse event.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index d3bcf02f217..2606c8b4ca4 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -313,13 +313,14 @@ This command must be bound to a mouse click."
(or (eq frame oframe)
(set-mouse-position (selected-frame) (1- (frame-width)) 0))))
-(defun mouse-tear-off-window (click)
- "Delete the window clicked on, and create a new frame displaying its buffer."
+(define-obsolete-function-alias 'mouse-tear-off-window 'tear-off-window "24.4")
+(defun tear-off-window (click)
+ "Delete the selected window, and create a new frame displaying its buffer."
(interactive "e")
(mouse-minibuffer-check click)
(let* ((window (posn-window (event-start click)))
(buf (window-buffer window))
- (frame (make-frame)))
+ (frame (make-frame))) ;FIXME: Use pop-to-buffer.
(select-frame frame)
(switch-to-buffer buf)
(delete-window window)))