Fix chaotic indentation of C++ lambda. Enhance documentation thereof

* lisp/progmodes/cc-engine.el (c-looking-at-inexpr-block): qualify an
invocation of c-on-identifier with a check we're not at the _end_ of an
identifier.

* doc/misc/cc-mode.texi: (Tex title page): Remove @subtitlefont because the
perl versions of texi2dvi haven't implemented it.
(Syntactic Symbols): Note that `inlambda' is also used in C++ Mode, not just
in Pike Mode.
(Statement Block Symbols): Add a section illustrating a C++ lambda function.
(FAQ): Add a question about "excessive" indentation of the contents of a C++
lambda function, and how to get rid of it.
This commit is contained in:
Alan Mackenzie 2017-03-19 17:09:27 +00:00
parent 06a7963986
commit d602785139
2 changed files with 35 additions and 3 deletions

View file

@ -10661,7 +10661,8 @@ comment at the start of cc-engine.el for more info."
(progn
(c-backward-token-2 1 nil lim)
(and
(not (c-on-identifier))
(not (and (c-on-identifier)
(looking-at c-symbol-chars)))
(not (looking-at c-opt-op-identifier-prefix)))))))
(cons 'inlambda bracket-pos))
((and c-recognize-paren-inexpr-blocks