Don't misfontify "foo ()" inside C++ initialization parentheses as a type
commit4cb8696e4754d815efd5fd5e26f2b6b2567a11fe
authorAlan Mackenzie <acm@muc.de>
Wed, 13 Dec 2017 20:55:03 +0000 (13 20:55 +0000)
committerAlan Mackenzie <acm@muc.de>
Wed, 13 Dec 2017 20:55:03 +0000 (13 20:55 +0000)
tree7272c661d7d1cd25d00deb9d1209a99507903dcb
parentce31e726adbb4d24557b3d1ff067cc4c04d94446
Don't misfontify "foo ()" inside C++ initialization parentheses as a type

Also recognize and handle function names introduced by "extern" inside a
function.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Add a new element to
the result list which is t when our declaration is, or is to be treated as,
being at top level.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Detect being
inside a C++ uniform initialization and return (not-decl nil) for this case.
(c-font-lock-declarations): Use the new element 4 of the result of
c-forward-decl-or-cast-1.

* lisp/progmodes/cc-langs.el (c-make-top-level-kwds, c-make-top-level-key):
New lang consts/vars.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-fonts.el
lisp/progmodes/cc-langs.el