From 02b521ad7456ae6834b0399ec80f56ee8ca09522 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sun, 10 Apr 2022 12:20:39 +0000 Subject: [PATCH] CC Mode: Fix unwanted fontification of function call as function declaration This happens when the enclosing function's return type is a struct, etc. This fixes bug #54743; * lisp/progmodes/cc-engine.el (c-update-brace-stack): Replace "(" by ")" in a `member' call. --- lisp/progmodes/cc-engine.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index ebc1ef43010..b2fa9e06911 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -6139,7 +6139,7 @@ comment at the start of cc-engine.el for more info." (setq s (cons -1 (cdr s)))) ((and (equal match ",") (eq (car s) -1))) ; at "," in "class foo : bar, ..." - ((member match '(";" "*" "," "(")) + ((member match '(";" "*" "," ")")) (when (and s (cdr s) (<= (car s) 0)) (setq s (cdr s)))) ((c-keyword-member kwd-sym 'c-flat-decl-block-kwds) -- 2.39.5