Subject: Re: bug#28850: 26.0.90; Error running timer 'jit-lock-stealth-fontify': (error "Invalid search bound (wrong side of point)")

From: Alan Mackenzie <[email-masked]>
Date: Tue, 30 Apr 2019 15:50:52 +0000

Hello, Eli.

On Tue, Apr 30, 2019 at 18:35:15 +0300, Eli Zaretskii wrote:
> > From: "Basil L. Contovounesios" <[email-masked]>
> > Cc: Eli Zaretskii <[email-masked]>,  <[email-masked]>
> > Date: Tue, 30 Apr 2019 14:44:27 +0100
 
> > > I'm just thinking, maybe this fix should have gone into the emacs-26
> > > branch.  Not sure about that.

> > The patch looks unproblematic enough to me, but that is, of course,
> > Eli's call.

> Btw, I'm not sure I understand the need for calling (point) in that
> patch.  Both functions return the value of point, and they both return
> LIMIT if they fail to find a match, so just testing the return value
> against LIMIT should be enough, no?

What happens is the search-forward-regexp finds a match entirely before
LIMIT, but the body of the loop processes the entire construct
introduced by that match and leaves point at the end of the construct.
This can be after LIMIT.  Hence the check on (point) before the
search-forward-regexp.

-- 
Alan Mackenzie (Nuremberg, Germany).