From ec11a271f40035e946a549b4ff3c21bed6680562 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Mon, 22 Jul 2024 12:24:43 +0000 Subject: [PATCH] FIx spurious fontification of variable in Java Mode This fixes bug#72126. * lisp/progmodes/cc-engine.el (c-forward-<>-arglist): Remove tentative type identifier from c-record-type-identifiers should it turn out not to be a type. (cherry picked from commit caf7426f0ca280b7cf40736e595cad8f7361152f) --- lisp/progmodes/cc-engine.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index e9e58f45aa8..4c319a78e01 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -8771,6 +8771,7 @@ multi-line strings (but not C++, for example)." ;; This function might do hidden buffer changes. (let ((start (point)) + (old-record-type-identifiers c-record-type-identifiers) (old-found-types (copy-hash-table c-found-types)) ;; If `c-record-type-identifiers' is set then activate ;; recording of any found types that constitute an argument in @@ -8807,7 +8808,8 @@ multi-line strings (but not C++, for example)." (nconc c-record-found-types c-record-type-identifiers))) t) - (setq c-found-types old-found-types) + (setq c-record-type-identifiers old-record-type-identifiers + c-found-types old-found-types) (goto-char start) nil)))) -- 2.39.2