kmacro-x

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

commit b5410e297ea0c3b8dfa9bcdb3bc79c957bc38872
parent d0ede52b476940c3cad62648acecc17bc2272cdf
Author: Wojciech Siewierski <wojciech@siewierski.eu>
Date:   Sat, 15 Jan 2022 15:23:56 +0100

Add a defcustom for the kmacro-mc-region key sequence

Diffstat:
Mkmacro-mc.el | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/kmacro-mc.el b/kmacro-mc.el @@ -45,6 +45,16 @@ '((t (:inherit hi-yellow))) ;`highlight-regexp' hardcodes `hi-yellow' "The face used by `kmacro-mc-region'.") +(defcustom kmacro-mc-region-sequence-fmt "C-s %s C-r RET 2*C-s RET" + "The sequence of keys used by `kmacro-mc-region'. + +This sequence should search for the next occurrence of the query +and leave the region in a predictable state for the user to use. + +The search query will be spliced into it using `format', and so +it should contain exactly one `%s' placeholder." + :type 'string) + ;;;###autoload (defun kmacro-mc-region (start end &optional highlight) @@ -65,7 +75,7 @@ highlight later." (deactivate-mark) (kmacro-push-ring) (setq last-kbd-macro - (read-kbd-macro (format "C-s %s C-r RET 2*C-s RET" + (read-kbd-macro (format kmacro-mc-region-sequence-fmt (format-kbd-macro query)))) (when highlight (highlight-regexp (regexp-quote query)