summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-engine.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2017-03-19 17:09:27 +0000
committerAlan Mackenzie <acm@muc.de>2017-03-19 17:09:27 +0000
commitd602785139c57274e835e7b56305d42e72a28b0d (patch)
tree061f6897800a770e85a5014fc4f4b8bfcafe85fb /lisp/progmodes/cc-engine.el
parent06a796398646fd1a5e17bc7321e12ae8e061e7f7 (diff)
downloademacs-d602785139c57274e835e7b56305d42e72a28b0d.tar.gz
emacs-d602785139c57274e835e7b56305d42e72a28b0d.tar.bz2
emacs-d602785139c57274e835e7b56305d42e72a28b0d.zip
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.
Diffstat (limited to 'lisp/progmodes/cc-engine.el')
-rw-r--r--lisp/progmodes/cc-engine.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index a5ade09791a..bdc77dc5028 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -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