On Tue, 5 Apr 2022 at 20:12, Juri Linkov wrote: >> But that's a good point, we don't need a macro. Among several >> variations, we could make the setup code look like this: >> >> (minibuffer-with-setup-hook >> (minibuffer-lazy-highlight-init :case-fold case-fold-search >> :regexp regexp-flag >> ...) >> (query-replace-read-from prompt regexp-flag)) >> >> where now `minibuffer-lazy-highlight-init' is not the function that >> initializes stuff, but rather a function that returns a closure that >> initializes stuff. > > Looks good. Okay, I've refactored my code like this. I actually like it better that way. (As a downside, the stuff that was already merged to isearch.el is completely changed.)