Subject: Re: bug#55230: CC Mode 5.35.1 (C++//l); Cache inconsistency

From: Alan Mackenzie <[email-masked]>
Date: Sun, 22 May 2022 17:12:11 +0000

Hello, Michael.

On Sun, May 22, 2022 at 09:33:53 -0400, Michael Welsh Duggan wrote:
> Alan Mackenzie <[email-masked]> writes:

> > On Thu, May 19, 2022 at 00:24:18 -0400, Michael Welsh Duggan wrote:

> >> Unfortunately, it [the patch] has some major problems.  If you follow
> >> the original recipe, after the first brace is input cc-mode errors out
> >> with "Marker does not point anywhere".  Backtrace follows:

> >> Debugger entered--Lisp error: (error "Marker does not point anywhere")
> >>   c-restore-string-fences()
> >>   c-electric-brace(nil)
> >>   funcall-interactively(c-electric-brace nil)
> >>   command-execute(c-electric-brace)

> > Apologies for that.  I had failed to test the scenario from a freshly
> > started Emacs.  The problem was setting and clearing text properties
> > without masking before-change-functions and after-change-functions.
> > This allowed a recursive call to these text property functions which
> > fouled things up.

> > This is now corrected.  Please undo the previous faulty patch and apply
> > the one in this post instead.  I think it should have fixed the bug.
> > Thanks!  I look forward to hearing from you again.

> That seems to have done the trick.  Thank you!

Thank you for the testing!  I have now committed the patch, and I am
closing the bug with this post.

> >> >> > Emacs : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X
> >> >> > toolkit, cairo version 1.16.0)
> >> >> >  of 2022-04-09
> >> >> > Package: CC Mode 5.35.1 (C++//l)
> >> >> > Buffer Style: gnu
> >> >> > c-emacs-features: (pps-extended-state col-0-paren
> >> >> > posix-char-classes gen-string-delim gen-comment-delim
> >> >> > syntax-properties 1-bit)

> -- 
> Michael Welsh Duggan
> ([email-masked])

-- 
Alan Mackenzie (Nuremberg, Germany).