Function: cua-sequence-rectangle

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

Signature

(cua-sequence-rectangle FIRST INCR FORMAT)

Documentation

Resequence each line of CUA rectangle starting from FIRST.

The numbers are formatted according to the FORMAT string.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/cua-rect.el.gz
(defun cua-sequence-rectangle (first incr format)
  "Resequence each line of CUA rectangle starting from FIRST.
The numbers are formatted according to the FORMAT string."
  (interactive
   (list (if current-prefix-arg
             (prefix-numeric-value current-prefix-arg)
           (string-to-number
            (read-string (format-prompt "Start value" 0) nil nil "0")))
         (string-to-number
          (read-string (format-prompt "Increment" 1) nil nil "1"))
         (read-string (concat "Format: (" cua--rectangle-seq-format ") "))))
  (if (= (length format) 0)
      (setq format cua--rectangle-seq-format)
    (setq cua--rectangle-seq-format format))
  (cua--rectangle-operation 'clear nil t 1 nil
     (lambda (s e _l _r)
         (delete-region s e)
         (insert (format format first))
         (setq first (+ first incr)))))