[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18. Editing C Code

This is a smart editing mode for C code. It knows a lot about C syntax and tries to position the cursor according to C layout conventions. You can change the details of the layout style with option variables.

The mode provides the following features:

The variables controlling indentation style are:

Non-nil means TAB in C mode should always reindent the current line, regardless of where in the line point is when the TAB command is used.

Non-nil means automatically newline before and after braces, and after colons and semicolons, inserted in C code.

Indentation of C statements within surrounding block. The surrounding block's indentation is the indentation of the line on which the open-brace appears.

Extra indentation given to a substatement, such as the then-clause of an if or body of a while.

Extra indentation given to a brace that starts a substatement. This is in addition to c-continued-statement-offset.

Extra indentation for line if it starts with an open brace.

An open brace following other text is treated as if it were this far to the right of the start of its line.

Indentation level of declarations of C function arguments.

Extra indentation for line that is a label, or case or default.

NOTE: This package has been obsoleted by the cc-mode package (see section `Top' in CC Mode Manual). cc-mode can be quite slow, however, on large files, even on fast machines. This version works with no problems on the XEmacs source code and is very very fast.

To configure this package, type:

  M-x customize-group RET old-c RET

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by XEmacs Webmaster on October, 2 2007 using texi2html