Changing Indent Style Custom C Indent Variables for C Indent
Here is a table of valid syntactic symbols for indentation in C and
related modes, with their syntactic meanings. Normally, most of these
symbols are assigned offsets in c-offsets-alist
.
string
|
Inside a multi-line string. |
c
|
Inside a multi-line C style block comment. |
defun-open
|
On a brace that opens a function definition. |
defun-close
|
On a brace that closes a function definition. |
defun-block-intro
|
In the first line in a top-level defun. |
class-open
|
On a brace that opens a class definition. |
class-close
|
On a brace that closes a class definition. |
inline-open
|
On a brace that opens an in-class inline method. |
inline-close
|
On a brace that closes an in-class inline method. |
extern-lang-open
|
On a brace that opens an external language block. |
extern-lang-close
|
On a brace that closes an external language block. |
func-decl-cont
|
The region between a function definition's argument list and the defun
opening brace (excluding K&R function definitions). In C, you cannot
put anything but whitespace and comments between them; in C++ and Java,
|
knr-argdecl-intro
|
On the first line of a K&R C argument declaration. |
knr-argdecl
|
In one of the subsequent lines in a K&R C argument declaration. |
topmost-intro
|
On the first line in a topmost construct definition. |
topmost-intro-cont
|
On the topmost definition continuation lines. |
member-init-intro
|
On the first line in a member initialization list. |
member-init-cont
|
On one of the subsequent member initialization list lines. |
inher-intro
|
On the first line of a multiple inheritance list. |
inher-cont
|
On one of the subsequent multiple inheritance lines. |
block-open
|
On a statement block open brace. |
block-close
|
On a statement block close brace. |
brace-list-open
|
On the opening brace of an |
brace-list-close
|
On the closing brace of an |
brace-list-intro
|
On the first line in an |
brace-list-entry
|
On one of the subsequent lines in an |
brace-entry-open
|
On one of the subsequent lines in an |
statement
|
On an ordinary statement. |
statement-cont
|
On a continuation line of a statement. |
statement-block-intro
|
On the first line in a new statement block. |
statement-case-intro
|
On the first line in a |
statement-case-open
|
On the first line in a |
inexpr-statement
|
On a statement block inside an expression. This is used for a GNU extension to the C language, and for Pike special functions that take a statement block as an argument. |
inexpr-class
|
On a class definition inside an expression. This is used for anonymous classes and anonymous array initializers in Java. |
substatement
|
On the first line after an |
substatement-open
|
On the brace that opens a substatement block. |
case-label
|
On a |
access-label
|
On a C++ |
label
|
On any ordinary label. |
do-while-closure
|
On the |
else-clause
|
On the |
catch-clause
|
On the |
comment-intro
|
On a line containing only a comment introduction. |
arglist-intro
|
On the first line in an argument list. |
arglist-cont
|
On one of the subsequent argument list lines when no arguments follow on the same line as the arglist opening parenthesis. |
arglist-cont-nonempty
|
On one of the subsequent argument list lines when at least one argument follows on the same line as the arglist opening parenthesis. |
arglist-close
|
On the closing parenthesis of an argument list. |
stream-op
|
On one of the lines continuing a stream operator construct. |
inclass
|
On a construct that is nested inside a class definition. The indentation is relative to the open brace of the class definition. |
inextern-lang
|
On a construct that is nested inside an external language block. |
inexpr-statement
|
On the first line of statement block inside an expression. This is used
for the GCC extension to C that uses the syntax |
inexpr-class
|
On the first line of a class definition inside an expression. This is used for anonymous classes and anonymous array initializers in Java. |
cpp-macro
|
On the start of a cpp macro. |
friend
|
On a C++ |
objc-method-intro
|
On the first line of an Objective-C method definition. |
objc-method-args-cont
|
On one of the lines continuing an Objective-C method definition. |
objc-method-call-cont
|
On one of the lines continuing an Objective-C method call. |
inlambda
|
Like |
lambda-intro-cont
|
On a line continuing the header of a lambda function, between the
|