commit c856393cb31a2d91682af2f65174c1fae1df60c4 parent 681a9ae80ba2da6b798a4bb47db8b8bedd49e366 Author: andsy10 <andsy1016@gmail.com> Date: Wed, 7 Oct 2026 23:45:23 +0800 Add defcustom for consecutive marking commands Diffstat:
| M | kmacro-x-mc.el | | | 12 | ++++++++++-- |
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/kmacro-x-mc.el b/kmacro-x-mc.el @@ -95,6 +95,15 @@ this scenario is so rare and so difficult to get right (from the user's perspective), this is just acknowledged here." :type 'boolean) +(defcustom kmacro-x-mc-safe-commands '(kmacro-x-mc-mark-next + kmacro-x-mc-mark-previous + kmacro-x-mc-unmark-next + kmacro-x-mc-unmark-previous) + "List of commands allowed to run consecutively while marking cursors. + +Used by `kmacro-x-mc--mark'." + :type '(repeat symbol)) + (defvar-local kmacro-x-mc-regexp nil "A regexp matching the intended cursor positions.") @@ -189,8 +198,7 @@ Otherwise searches forward." ;; Sanity check to prevent defining cursors with inconsistent ;; starting conditions. (when (and kmacro-x-mc-mode - (not (memq last-command '(kmacro-x-mc-mark-next - kmacro-x-mc-mark-previous)))) + (not (memq last-command kmacro-x-mc-safe-commands))) (user-error "This command can only be used when starting a bulk edit")) (unless kmacro-x-mc-mode