mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2026-02-04 14:22:24 +00:00
Create customizable mc/insert-numbers-default
This commit fulfills the feature request from #248 and creates a customizable variable called mc/insert-numbers-default which is the starting value for mc/insert-numbers if no arg is passed
This commit is contained in:
@@ -31,13 +31,20 @@
|
||||
|
||||
;;;###autoload
|
||||
(defun mc/insert-numbers (arg)
|
||||
"Insert increasing numbers for each cursor, starting at 0 or ARG."
|
||||
"Insert increasing numbers for each cursor, starting at
|
||||
`mc/insert-numbers-default' or ARG."
|
||||
(interactive "P")
|
||||
(setq mc--insert-numbers-number (or (and arg (prefix-numeric-value arg))
|
||||
0))
|
||||
mc/insert-numbers-default))
|
||||
(mc/for-each-cursor-ordered
|
||||
(mc/execute-command-for-fake-cursor 'mc--insert-number-and-increase cursor)))
|
||||
|
||||
(defcustom mc/insert-numbers-default 0
|
||||
"The default number at which to start counting for
|
||||
`mc/insert-numbers'"
|
||||
:type 'integer
|
||||
:group 'multiple-cursors)
|
||||
|
||||
(defvar mc--insert-numbers-number 0)
|
||||
|
||||
(defun mc--insert-number-and-increase ()
|
||||
|
||||
Reference in New Issue
Block a user