kmacro-x

a fork of vifon's kmacro-x
git clone https://git.trogloxene.org/kmacro-x.git
Log | Files | Refs | README | LICENSE

commit 73e71c70736c0ed0e08e33c7ea4f691e910a8d8b
parent eae6121dd6d53ed0d2a9b1f475db5ba6f6f7ea51
Author: andsy10 <andsy1016@gmail.com>
Date:   Thu,  8 Oct 2026 00:47:37 +0800

Add defcustom for consecutive marking commands

Diffstat:
Mkmacro-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