Function: cua--indent-rectangle
cua--indent-rectangle is a byte-compiled function defined in
cua-rect.el.gz.
Signature
(cua--indent-rectangle &optional CH TO-COL CLEAR)
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/cua-rect.el.gz
(defun cua--indent-rectangle (&optional ch to-col clear)
;; Indent current rectangle.
(let ((col (cua--rectangle-insert-col))
(pad (cua--rectangle-virtual-edges))
indent)
(cua--rectangle-operation (if clear 'clear 'corners) nil t pad nil
(lambda (_s _e l _r)
(move-to-column col pad)
(if (and (eolp)
(< (current-column) col))
(move-to-column col t))
(cond
(to-col (indent-to to-col))
((and ch (not (eq ch ?\t))) (insert ch))
(t (tab-to-tab-stop)))
(if (cua--rectangle-right-side t)
(cua--rectangle-insert-col (current-column))
(setq indent (- (current-column) l))))
(lambda (l r)
(when (and indent (> indent 0))
(aset cua--rectangle 2 (+ l indent))
(aset cua--rectangle 3 (+ r indent -1)))))))