GNU Emacs Manual. Node: Syntactic Symbols

PREVChanging Indent Style UPCustom C Indent NEXTVariables for C Indent

20.5.5.4: Syntactic Symbols

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, throws declarations and other things can appear in this context.

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 enum or static array list.

brace-list-close

On the closing brace of an enum or static array list.

brace-list-intro

On the first line in an enum or static array list.

brace-list-entry

On one of the subsequent lines in an enum or static array list.

brace-entry-open

On one of the subsequent lines in an enum or static array list, when the line begins with an open brace.

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 case ``block.''

statement-case-open

On the first line in a case block starting with brace.

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 if, while, for, do, or else.

substatement-open

On the brace that opens a substatement block.

case-label

On a case or default label.

access-label

On a C++ private, protected, or public access label.

label

On any ordinary label.

do-while-closure

On the while that ends a do-while construct.

else-clause

On the else of an if-else construct.

catch-clause

On the catch and finally lines in try...catch constructs in C++ and Java.

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 ({ ... }). It is also used for the special functions that takes a statement block as an argument in Pike.

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++ friend declaration.

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 inclass, but used inside lambda (i.e. anonymous) functions. Only used in Pike.

lambda-intro-cont

On a line continuing the header of a lambda function, between the lambda keyword and the function body. Only used in Pike.

PREVChanging Indent Style UPCustom C Indent NEXTVariables for C Indent