Function: cua-copy-rectangle-as-text

cua-copy-rectangle-as-text is an interactive and byte-compiled function defined in cua-rect.el.gz.

Signature

(cua-copy-rectangle-as-text &optional ARG DELETE)

Documentation

Copy rectangle, but store as normal text.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/cua-rect.el.gz
(defun cua-copy-rectangle-as-text (&optional arg delete)
  "Copy rectangle, but store as normal text."
  (interactive "P")
  (if cua--global-mark-active
      (if delete
          (cua--cut-rectangle-to-global-mark t)
        (cua--copy-rectangle-to-global-mark t))
    (let* ((rect (cua--extract-rectangle))
           (text (mapconcat
                  (lambda (row) (concat row "\n"))
                  rect "")))
      (setq arg (cua--prefix-arg arg))
      (if cua--register
          (set-register cua--register text)
        (kill-new text)))
    (if delete
        (cua--delete-rectangle))
    (cua--deactivate)))