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:
- Expression and list commands understand all C brackets.
- Tab indents for C code.
- Comments are delimited with /* ... */.
- Paragraphs are separated by blank lines only.
- Delete converts tabs to spaces as it moves back.
The variables controlling indentation style are:
c-tab-always-indent
- 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.
c-auto-newline
- Non-nil means automatically newline before and after braces,
and after colons and semicolons, inserted in C code.
c-indent-level
- Indentation of C statements within surrounding block.
The surrounding block's indentation is the indentation
of the line on which the open-brace appears.
c-continued-statement-offset
- Extra indentation given to a substatement, such as the
then-clause of an if or body of a while.
c-continued-brace-offset
- Extra indentation given to a brace that starts a substatement.
This is in addition to c-continued-statement-offset.
c-brace-offset
- Extra indentation for line if it starts with an open brace.
c-brace-imaginary-offset
- An open brace following other text is treated as if it were
this far to the right of the start of its line.
c-argdecl-indent
- Indentation level of declarations of C function arguments.
c-label-offset
- 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
|
This document was generated
by XEmacs Webmaster on October, 2 2007
using texi2html