Mercurial > emacs
comparison lisp/mouse.el @ 6301:80e3ee8d618d
(mouse-kill): Select the clicked window first.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 11 Mar 1994 04:13:50 +0000 |
parents | 66c0ed95c03f |
children | 2b0355912ba6 |
comparison
equal
deleted
inserted
replaced
6300:0aa51282fbfe | 6301:80e3ee8d618d |
---|---|
378 (defun mouse-kill (click) | 378 (defun mouse-kill (click) |
379 "Kill the region between point and the mouse click. | 379 "Kill the region between point and the mouse click. |
380 The text is saved in the kill ring, as with \\[kill-region]." | 380 The text is saved in the kill ring, as with \\[kill-region]." |
381 (interactive "e") | 381 (interactive "e") |
382 (mouse-minibuffer-check click) | 382 (mouse-minibuffer-check click) |
383 (let ((click-posn (posn-point (event-start click)))) | 383 (let* ((posn (event-start click)) |
384 (click-posn (posn-point posn))) | |
385 (select-window (posn-window posn)) | |
384 (if (numberp click-posn) | 386 (if (numberp click-posn) |
385 (kill-region (min (point) click-posn) | 387 (kill-region (min (point) click-posn) |
386 (max (point) click-posn))))) | 388 (max (point) click-posn))))) |
387 | 389 |
388 (defun mouse-yank-at-click (click arg) | 390 (defun mouse-yank-at-click (click arg) |