]> git.eshelyaron.com Git - emacs.git/commitdiff
CC Mode: Fix unwanted fontification of function call as function declaration
authorAlan Mackenzie <acm@muc.de>
Sun, 10 Apr 2022 12:20:39 +0000 (12:20 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 10 Apr 2022 12:20:39 +0000 (12:20 +0000)
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

index ebc1ef4301010d484507705bb9b91a12fba9c839..b2fa9e06911a6a59d74bd4f81b5473868ed3aae4 100644 (file)
@@ -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)