bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49534: 26.3; Isearch should support using filter predicates with emp


From: Stefan Monnier
Subject: bug#49534: 26.3; Isearch should support using filter predicates with empty search hits
Date: Tue, 13 Jul 2021 18:48:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> This means that if isearch-filter-predicate does own matching,
> it will break later (= (match-beginning 0) (match-end 0)).
> What would be better: to remember its result in a let-bound variable,
> or to use save-match-data?  Probably, save-match-data:

Remembering the result in a var might be more efficient.
Also if `isearch-filter-predicate` clobbers the match data we have more
problems (unless it tells us to skip this match).

But whichever choice we make I think the docstring of
`isearch-filter-predicate` should clarify what happens with the match
data (i.e. whether it needs to be careful not to clobber it or not).


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]