CC Mode: Don't start fontifying in the middle of an identifier

This fixes bug#70367.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): After searching
backwards for the end of the previous statement, check whether
or not we found it.
This commit is contained in:
Alan Mackenzie 2024-04-14 08:21:56 +00:00
parent 2823eae0b7
commit b2842b25bf

View file

@ -2463,7 +2463,7 @@ with // and /*, not more generic line and block comments."
(backward-char)
(setq pseudo (c-cheap-inside-bracelist-p (c-parse-state)))))))
(goto-char pseudo))
t)
(or pseudo (> (point) bod-lim)))
;; Move forward to the start of the next declaration.
(progn (c-forward-syntactic-ws)
;; Have we got stuck in a comment at EOB?