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

From: Drew Adams <[email-masked]>
Date: Fri, 28 Aug 2015 09:59:18 -0700 (PDT)

> OK, I think I found the problem.  I have something working,
> but will send it in the form of a patch in a while.
> 
> Essentially, it is the isearch.el code itself that imposes, in
> a few places, not searching past (window-end) or before
> (window-start), regardless of the value of
> `isearch-lazy-highlight-max-at-a-time'.  This is what needs to
> be fixed, to be (point-max) and (point-min) when
> `isearch-lazy-highlight-max-at-a-time' is nil.
> 
> A more thoroughgoing fix would take into account a numeric
> value of `isearch-lazy-highlight-max-at-a-time', but I won't
> bother with that, for now.

Attached is a quick patch that seems to be OK wrt fixing
things for a nil value of `isearch-lazy-highlight-max-at-a-time'.

Please give it a try.  If OK then I will update the doc and
defcustom to make clear that (for now) this works only for
nil and not for a large value.

Feel free to adjust the fix.  Or to extend it to also take a
numeric value into account.  But I will be happy if it is fixed
at least for nil.