Function: mouse-kill

mouse-kill is an interactive and byte-compiled function defined in mouse.el.gz.

Signature

(mouse-kill CLICK)

Documentation

Kill the region between point and the mouse click.

The text is saved in the kill ring, as with C-w (kill-region).

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mouse.el.gz
(defun mouse-kill (click)
  "Kill the region between point and the mouse click.
The text is saved in the kill ring, as with \\[kill-region]."
  (interactive "e")
  (mouse-minibuffer-check 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)))))