Function: cua--rectangle-region-extract
cua--rectangle-region-extract is a byte-compiled function defined in
cua-rect.el.gz.
Signature
(cua--rectangle-region-extract ORIG &optional DELETE)
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/cua-rect.el.gz
(defun cua--rectangle-region-extract (orig &optional delete)
(cond
((not cua--rectangle)
(funcall orig delete))
((eq delete 'bounds)
(cua--extract-rectangle-bounds))
((eq delete 'delete-only)
(cua--delete-rectangle))
(t
(let* ((strs (cua--extract-rectangle))
(str (mapconcat #'identity strs "\n")))
(if delete (cua--delete-rectangle))
(setq killed-rectangle strs)
(setq cua--last-killed-rectangle
(cons (and kill-ring (car kill-ring)) killed-rectangle))
(when (eq last-command 'kill-region)
;; Try to prevent kill-region from appending this to some
;; earlier element.
(setq last-command 'kill-region-dont-append))
(when strs
(put-text-property 0 (length str) 'yank-handler
`(rectangle--insert-for-yank ,strs t)
str)
str)))))