Subject: Re: bug#29024: CC-mode infinite loop on typing < in template spec

From: Alan Mackenzie <[email-masked]>
Date: Fri, 27 Oct 2017 13:40:36 +0000

Hello, Eli.

On Fri, Oct 27, 2017 at 11:28:47 +0300, Eli Zaretskii wrote:
> > From: Richard Copley <[email-masked]>
> > Date: Fri, 27 Oct 2017 08:40:45 +0100

> > #29024 appears to be the same bug as #28926.

> Strangely enough, with today's emacs-26 branch, I cannot reproduce
> either of those two recipes.  I can reproduce them with stock 26.0.90
> pretest, though.  Maybe this only happens in optimized builds?

> Alan, are you looking into this?

I think I fixed it last Sunday (though I haven't checked properly yet),
with the following commit to the emacs-26 branch:

  commit b7c4aa951c8b12629742df9d20d6374c3d2a8ba8
  Date:   Sun Oct 22 14:18:20 2017 +0000

  Refactor c-forward-token-2 with new function c-forward-over-token-and-ws.

  Use the new function directly in several places where c-forward-token-2
  wouldn't move over the last token in the buffer.  This caused an infinite loop
  in c-restore-<>-properties.

Though, with the benefit of hindsight, the top line of the commit message
wasn't as helpful as it might have been.

Again, regrets that the bug happened at all.

-- 
Alan Mackenzie (Nuremberg, Germany).