Function: cua-mouse-save-then-kill-rectangle

cua-mouse-save-then-kill-rectangle is an interactive and byte-compiled function defined in cua-rect.el.gz.

Signature

(cua-mouse-save-then-kill-rectangle EVENT ARG)

Documentation

Expand rectangle to mouse click position and copy rectangle.

If command is repeated at same position, delete the rectangle.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/cua-rect.el.gz
(defun cua-mouse-save-then-kill-rectangle (event arg)
  "Expand rectangle to mouse click position and copy rectangle.
If command is repeated at same position, delete the rectangle."
  (interactive "e\nP")
  (if (and (eq this-command last-command)
           (eq (point) (car-safe cua--mouse-last-pos))
           (eq cua--last-killed-rectangle (cdr-safe cua--mouse-last-pos)))
      (progn
        (unless buffer-read-only
          (cua--delete-rectangle))
        (cua--deactivate))
    (cua-mouse-resize-rectangle event)
    (let ((cua-keep-region-after-copy t))
      (cua-copy-region arg)
      (setq cua--mouse-last-pos (cons (point) cua--last-killed-rectangle)))))