Function: cua-copy-region

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

Signature

(cua-copy-region ARG)

Documentation

Copy the region 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-copy-region (arg)
  "Copy the region to the kill ring.
With numeric prefix arg, copy to register 0-9 instead."
  (interactive "P")
  (setq arg (cua--prefix-arg arg))
  (setq cua--last-killed-rectangle nil)
  (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 nil 'region))
     ((eq this-original-command 'clipboard-kill-ring-save)
      (clipboard-kill-ring-save start end 'region))
     (t
      (copy-region-as-kill start end 'region)))
    (if cua-keep-region-after-copy
	(cua--keep-active)
      (cua--deactivate))))