Function: cua-cut-region

cua-cut-region is an interactive and byte-compiled function defined in cua-base.el.gz.

Signature

(cua-cut-region ARG)

Documentation

Cut the region and copy to the kill ring.

With numeric prefix arg, copy to register 0-9 instead.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/cua-base.el.gz
(defun cua-cut-region (arg)
  "Cut the region and copy to the kill ring.
With numeric prefix arg, copy to register 0-9 instead."
  (interactive "P")
  (setq cua--last-killed-rectangle nil)
  (if buffer-read-only
      (cua-copy-region arg)
    (setq arg (cua--prefix-arg arg))
    (let ((start (mark)) (end (point)))
      (or (<= start end)
	  (setq start (prog1 end (setq end start))))
      (cond
       (cua--register
	(copy-to-register cua--register start end t 'region))
       ((eq this-original-command 'clipboard-kill-region)
	(clipboard-kill-region start end 'region))
       (t
	(kill-region start end 'region))))
    (cua--deactivate)))