]> git.eshelyaron.com Git - emacs.git/commit
CC Mode: Make implicit int types following specifiers fontify correctly
authorAlan Mackenzie <acm@muc.de>
Thu, 17 Nov 2022 10:34:41 +0000 (10:34 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 17 Nov 2022 10:36:59 +0000 (10:36 +0000)
commitca3cc92e14a6bdaf6fb817fff9e633f30d461359
tree81248fd8333c83d08eec5d655bf3c8dbfd82bfd1
parent5df1fd19baddb811ab358b6f1358d4b6fad434a2
CC Mode: Make implicit int types following specifiers fontify correctly

This fixes bug #59267.  It applies to C Mode only, and refers to constructs
like "register count;" which are implicitly of int type.

* lisp/progmodes/cc-engine.el (c-forward-type): Use the new regexp
c-maybe-typeless-specifier-re in place of c-opt-type-modifier-prefix-key.  Add
an extra arm to the main cond form to handle the construct, and another to
handle "extern "C" foo_t my_foo;".
(c-forward-decl-or-cast-1): Adapt to handle the result no-id from
c-forward-type.

* lisp/progmodes/cc-langs.el (c-maybe-typeless-specifier-re): New lang
const/var.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el