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

Alan Mackenzie <[email protected]> Sat, 21 May 2022 10:03:10 +0000
Newsgroups gmane.emacs.cc-mode.general
Message-ID <Yoi43uQfsZdhFroW@ACM>
Hello, Michael.

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.

> >> > 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 protected])

-- 
Alan Mackenzie (Nuremberg, Germany).
diff.20220520.diff (text/plain, 110.6 KB) - not displayed