Fontify untyped function declarations in C Mode correctly.
commit4e0b67ed27114fa2cbebca32567089fd8fa78425
authorAlan Mackenzie <acm@muc.de>
Wed, 4 Oct 2017 17:34:27 +0000 (4 17:34 +0000)
committerAlan Mackenzie <acm@muc.de>
Wed, 4 Oct 2017 17:34:27 +0000 (4 17:34 +0000)
tree278d6df6528d9ced3b602a43bae83052bbbf5f81
parent0b558b4acb8326c6f26fcde47ca85777716ae831
Fontify untyped function declarations in C Mode correctly.

Also correct two bugs where deleting WS at a BOL could leave an untyped
function declaration unfontified.

* lisp/progmodes/cc-engine.el (c-find-decl-spots): Don't set the flag
"top-level" when we're in a macro.
(c-forward-decl-or-cast-1): Recognize top-level "foo(bar)" or "foo()" in C
Mode as a implicitly typed function declaration.
(c-just-after-func-arglist-p): Don't get confused by "defined (foo)" inside a
macro.  It's not a function plus arglist.

* lisp/progmodes/cc-langs.el (c-cpp-expr-functions-key): New defconst and
defvar.

* lisp/progmodes/cc-mode.el (c-fl-decl-end): After c-forward-declarator, move
over any following parenthesis expression (i.e. parameter list).
(c-change-expand-fl-region): When c-new-END is at a BOL, include that line in
the returned region, to cope with deletions at column 0.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el
lisp/progmodes/cc-mode.el