Welcome to CC Mode. This is a GNU Emacs mode for editing files
containing C, C++, Objective-C, Java, and CORBA IDL code. This
incarnation of the mode is descendant from `c-mode.el
' (also called
"Boring Old C Mode" or BOCM :-)
, and `c++-mode.el
' version
2, which I have been maintaining since 1992. CC Mode represents a
significant milestone in the mode's life. It has been fully merged back
with Emacs 19's `c-mode.el
'. Also a new, more intuitive and
flexible mechanism for controlling indentation has been developed.
CC Mode supports the editing of K&R and ANSI C, ARM [1] C++, Objective-C, Java and CORBA's Interface Definition Language files. In this way, you can easily set up consistent coding styles for use in editing all C, C++, Objective-C, Java and IDL programs. CC Mode does not handle font-locking (a.k.a. syntax coloring, keyword highlighting) or anything of that nature, for any of these modes. Font-locking is handled by other Emacs packages.
This manual will describe the following:
Note that the name of this package is ``CC Mode'', but there is no top
level cc-mode
entry point. All of the variables, commands, and
functions in CC Mode are prefixed with c-<thing>
, and
c-mode
, c++-mode
, objc-mode
, java-mode
, and
idl-mode
entry points are provided. This file is intended to be
a replacement for `c-mode.el
' and `c++-mode.el
'.
This distribution also contains a file
called `cc-compat.el
' which should ease your transition from BOCM
to CC Mode. If you have a BOCM configuration you are really happy
with, and want to postpone learning how to configure CC Mode, take a
look at that file. It maps BOCM configuration variables to CC Mode's
new indentation model. It is not actively supported so for the long
run, you should learn how to customize CC Mode to support your coding
style.
A special word of thanks goes to Krishna Padmasola for his work in
converting the original `README
' file to Texinfo format. I'd also
like to thank all the CC Mode victims who help enormously during the
early beta stages of CC Mode's development.
[1] ``The Annotated C++ Reference Manual'', by Ellis and Stroustrup.