diff options
| author | Alan Mackenzie | 2019-06-02 14:05:33 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2019-06-02 14:05:33 +0000 |
| commit | 30b0c5bf42efb27b7afc5a7cf715bae2fe09923c (patch) | |
| tree | 7b62b21ca39d067227cefb8c2b2b136beef63b6f /doc | |
| parent | d920ec617b5768167f6a14167ed2cc590f45dda7 (diff) | |
| download | emacs-30b0c5bf42efb27b7afc5a7cf715bae2fe09923c.tar.gz emacs-30b0c5bf42efb27b7afc5a7cf715bae2fe09923c.zip | |
Change default offset of CC Mode syntactic symbol inlambda to 0
It's previous default was c-lineup-inexpr-block. This change is mainly to
prevent excessive indentation of the innards of C++ lambda functions.
* lisp/progmodes/cc-vars.el (c-offsets-alist): Amend the offset for inlambda
to 0.
* doc/misc/cc-mode.texi (FAQ): Amend the answer to the question about this
matter.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/cc-mode.texi | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index df6709e38c2..ab1c8e6f520 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi | |||
| @@ -7431,13 +7431,15 @@ could amend your C++ Mode hook like this: | |||
| 7431 | @emph{How do I stop my C++ lambda expressions being indented way over | 7431 | @emph{How do I stop my C++ lambda expressions being indented way over |
| 7432 | to the right?} | 7432 | to the right?} |
| 7433 | 7433 | ||
| 7434 | Change the offset associated with @code{inlambda} from its default, | 7434 | This is now the default, so you don't need to do anything. To restore |
| 7435 | the function @code{c-lineup-inexpr-block}, to 0. For example, if you | 7435 | the previous default, indenting lambda expressions to the right of the |
| 7436 | are setting offsets in a hook function you might include the following | 7436 | constructs which introduce them, change the offset associated with |
| 7437 | line: | 7437 | @code{inlambda} from 0 to @code{c-lineup-inexpr-block}. For example, |
| 7438 | if you are setting offsets in a hook function you might include the | ||
| 7439 | following line: | ||
| 7438 | 7440 | ||
| 7439 | @example | 7441 | @example |
| 7440 | (c-set-offset 'inlambda 0) | 7442 | (c-set-offset 'inlambda 'c-lineup-inexpr-block) |
| 7441 | @end example | 7443 | @end example |
| 7442 | 7444 | ||
| 7443 | For details of the different ways you can make this setting, | 7445 | For details of the different ways you can make this setting, |