]> code.delx.au - gnu-emacs/commit
Prevent C++ Mode wrongly fontifying some identifiers near templates as types
authorAlan Mackenzie <acm@muc.de>
Fri, 1 Apr 2016 12:50:14 +0000 (12:50 +0000)
committerAlan Mackenzie <acm@muc.de>
Fri, 1 Apr 2016 12:56:16 +0000 (12:56 +0000)
commit9151f16e8131e6fcd94aa9c8a1b10d9b08656b64
treea83f423ef9299c6c1da09fd5d3a771df95c251db
parentb3b523cdd66c53677c39f743a18e4c180c2ec248
Prevent C++ Mode wrongly fontifying some identifiers near templates as types

This fixes debbugs #7917.

* lisp/progmodes/cc-engine.el (c-forward-keyword-prefixed-id): Accept 'maybe
(from c-forward-type) as sufficient to record an id.  Record type id as well
as ref ids.
(c-forward-name): Bind c-last-identifier-range around the call to
c-forward-<>-arglist to prevent it getting corrupted.  Don't automatically
assume an identifier is a type when a template ">" is followed by a "(".
(c-forward-type): Don't automatically assume an identifier is a type when a
template ">" is followed by a "(".

* lisp/progmodes/cc-fonts.el (c-font-lock-<>-arglists): Don't fontify an
identifier as a type when its associated ">" is followed by a "(".
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-fonts.el