Handle C++11 lambda functions.
commitce1ed9c8116e280c69f04a455176f6097ca0855c
authorAlan Mackenzie <acm@muc.de>
Mon, 15 Aug 2016 11:52:32 +0000 (15 11:52 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 15 Aug 2016 11:52:32 +0000 (15 11:52 +0000)
tree75e3dffe10372dee3d44466eb8be58ebbacc1d3c
parent9c2ce57719d0db8ac0a01b65d7e8d7ccc3f2d6ca
Handle C++11 lambda functions.

* lisp/progmodes/cc-engine.el (c-looking-at-inexpr-block): Enhance also to
handle C++ lambda functions.
(c-looking-at-c++-lambda-capture-list): New function.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Recognize the
parameter list of a lambda function and set `context' and
`c-restricted-<>-arglists' suitably for it.
(c-font-lock-c++-lambda-captures): New function.
(c-complex-decl-matchers): Insert c-font-lock-c++-lambda-captures into it.

* lisp/progmodes/cc-langs.el (c-pre-lambda-tokens, c-pre-lambda-tokens-re):
New language constants/variables.
(c-paren-nontype-kwds): Include "noexcept" in the C++ value.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): Handle being in a C++ lambda
function capture list.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-fonts.el
lisp/progmodes/cc-langs.el
lisp/progmodes/cc-mode.el