From 72bdf5eed1079e265dff8636f5d316b9c971cb2f Mon Sep 17 00:00:00 2001 From: Daniel Fleischer Date: Wed, 12 Jan 2022 21:19:32 +0200 Subject: [PATCH] cua-rectangle initial sequence number customization * lisp/emulation/cua-base.el: define `cua-rectangle-sequence-start' * lisp/emulation/cua-rect.el (cua-sequence-rectangle): using the customized variable. --- lisp/emulation/cua-base.el | 4 ++++ lisp/emulation/cua-rect.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 162d1bb641..da2c4ce870 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -389,6 +389,10 @@ cua-auto-tabify-rectangles (const :tag "Disabled" nil) (other :tag "Enabled" t))) +(defcustom cua-rectangle-sequence-start 0 + "Initial number when inserting a numerical sequence." + :type 'integer) + (defvar cua-global-keymap) ; forward (defvar cua--region-keymap) ; forward (declare-function cua-clear-rectangle-mark "cua-rect" ()) diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index e399fd0fbf..c90872e34b 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -1177,7 +1177,8 @@ cua-sequence-rectangle (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) (string-to-number - (read-string (format-prompt "Start value" 0) nil nil "0"))) + (read-string (format-prompt "Start value" cua-rectangle-sequence-start) + nil nil (number-to-string cua-rectangle-sequence-start)))) (string-to-number (read-string (format-prompt "Increment" 1) nil nil "1")) (read-string (concat "Format: (" cua--rectangle-seq-format ") ")))) -- 2.34.1