Fontify C++ for loop variable as variable, even when followed by parentheses
commit0e09d00f29e370ecfe2f2b22acff7b98c448bc30
authorAlan Mackenzie <acm@muc.de>
Fri, 12 May 2017 21:11:49 +0000 (12 21:11 +0000)
committerAlan Mackenzie <acm@muc.de>
Fri, 12 May 2017 21:11:49 +0000 (12 21:11 +0000)
tree4891922642a9348d6921ed3d75af37c3faee857e
parentafd8c762b7bb534f5686a0273f42cb7cd08e0d6f
Fontify C++ for loop variable as variable, even when followed by parentheses

In the following: "for (auto *Friend : Class->friends()) {", "Friend" was
getting fontified as a function, due to insufficient checking of the tokens
between it and "()".

* lisp/progmodes/cc-langs.el (c-:-op-cont-tokens, c-:-op-cont-regexp): New
lang-consts/vars.

* lisp/progmodes/cc-engine.el (c-forward-declarator): After finding a putative
declarator's identifier, check for a ":" token inside a for's parentheses, and
abort the search for "(" if this is found.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el