summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-03-11 04:13:50 +0000
committerKarl Heuer <kwzh@gnu.org>1994-03-11 04:13:50 +0000
commit142c76727e94b7fd1ac1ec5bc1d4a291b6f2085c (patch)
tree04ebd3f5f1b973a6570aeb383bd02126b3889b78 /lisp
parent25bef3dd72861957eb6b9c7dac7be4b4d9a67f20 (diff)
downloademacs-142c76727e94b7fd1ac1ec5bc1d4a291b6f2085c.tar.gz
(mouse-kill): Select the clicked window first.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mouse.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index d40fea1f50f..1fd789a546c 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -380,7 +380,9 @@ This must be bound to a mouse click."
The text is saved in the kill ring, as with \\[kill-region]."
(interactive "e")
(mouse-minibuffer-check click)
- (let ((click-posn (posn-point (event-start click))))
+ (let* ((posn (event-start click))
+ (click-posn (posn-point posn)))
+ (select-window (posn-window posn))
(if (numberp click-posn)
(kill-region (min (point) click-posn)
(max (point) click-posn)))))