On Sun, 15 May 2022 at 16:16, Stefan Monnier wrote: >> (when filter >> + (make-local-variable 'isearch-filter-predicate) >> (add-function :after-while isearch-filter-predicate filter)) > > `add-function` is modeled after `add-hook`, so the above > `make-local-variable` would be better replaced with > > (add-function :after-while (local 'isearch-filter-predicate) filter) > > [ Of course, that's pure theory. You'd better test it first. ] Yes, I guess that's the right way to approach this. The attached patch implements it.