From: Alan Mackenzie Date: Sun, 10 Apr 2022 12:20:39 +0000 (+0000) Subject: CC Mode: Fix unwanted fontification of function call as function declaration X-Git-Tag: emacs-29.0.90~1931^2~674 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=02b521ad7456ae6834b0399ec80f56ee8ca09522;p=emacs.git 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. --- 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)