www.delorie.com/gnu/docs/emacs/cc-mode_1.html   search  
Buy the book!

CC Mode Manual

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

1. Introduction

Welcome to CC Mode, a GNU Emacs mode for editing files containing C, C++, Objective-C, Java, CORBA IDL, and Pike 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 Barry has 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. Late in 1997, Martin joined the CC Mode Maintainers Team, and implemented the Pike support. As of 2000 Martin has taken over as the sole maintainer.

This manual describes CC Mode version 5.28.

CC Mode supports the editing of K&R and ANSI C, ARM (1) C++, Objective-C, Java, CORBA's Interface Definition Language, and Pike(2) files. In this way, you can easily set up consistent coding styles for use in editing all of these languages. 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, idl-mode, and pike-mode entry points are provided. This package 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.

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

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003