Subject: Re: bug#43702: Emacs master: Incorrect highlighting in regexp isearch.

From: Juri Linkov <[email-masked]>
Date: Thu, 01 Oct 2020 22:20:07 +0300

>> Maybe better to do what Drew proposed: to distinguish the odd groups
>> from the even groups, i.e. to have only 2 additional faces
>> (a brighter face like the current isearch-group-1 for the odd groups,
>> and a darker face for the even groups).
>
> I like the idea.

Implemented now on the trunk where isearch-group-odd is created
from the isearch-group-1 face, and isearch-group-even
from the isearch-group-4 face.

The result is quite nice:

>> So a better solution is maybe to save match-data on the isearch stack
>> and restore in isearch-pop-state (called by isearch-delete-char).
>> I could try to do this.
>
> Please do.

I'm on it (also adding even/odd faces to lazy-isearch - optionally
on the new user option lazy-highlight-submatches).