Subject: Re: bug#21092: 25.0.50; Option `lazy-highlight-max-at-a-time' does not work

From: Eli Zaretskii <[email-masked]>
Date: Sun, 30 Aug 2015 05:40:01 +0300

> From: Juri Linkov <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Sun, 30 Aug 2015 00:10:10 +0300
> 
> > IOW, I would like nil to behave as advertised: no limit.  This is the
> > use case that prompted me to file the bug and look for a solution.
> 
> There is no bug.  I have ‘lazy-highlight-max-at-a-time’ set to nil
> in my .emacs for years, and it worked as intended to optimize the
> performance of the screen-limited lazy-highlighting.  Please don't break
> this useful option.  With your proposed changes Isearch will be horribly slow
> to highlight all matches in a large buffer on every search state change.
> 
> There is no need to highlight all matches in the buffer during Isearch.

What if someone wants to?

> If you want a new feature, please create a new feature request
> with a subject like ‘Feature request: lazy-hi-lock on Isearch exit’
> that will highlight all matches in the buffer after you exit Isearch.

How about leaving the current meaning of nil as it is, i.e. limit the
highlighting to the visible portion of the buffer, and introducing a
special value like zero or -1 to mean highlight the whole buffer?