# CC Mode Manual

## Short Table of Contents

- 1 Introduction
- 2 Overview of the Manual
- 3 Getting Started
- 4 Commands
- 5 Font Locking
- 6 Configuration Basics
- 7 Customizing Filling and Line Breaking
- 8 Customizing Auto-newlines
- 9 Clean-ups
- 10 Indentation Engine Basics
- 11 Customizing Indentation
- 12 Customizing Macros
- 13 Odds and Ends
- Appendix A Sample Init File
- Appendix B Performance Issues
- Appendix C Limitations and Known Bugs
- Appendix D Frequently Asked Questions
- Appendix E Getting the Latest CC Mode Release
- Appendix F Mailing Lists and Submitting Bug Reports
- Appendix G GNU Free Documentation License
- Command and Function Index
- Variable Index
- Concept and Key Index

## Table of Contents

- 1 Introduction
- 2 Overview of the Manual
- 3 Getting Started
- 4 Commands
  - 4.1 Indentation Commands
  - 4.2 Comment Commands
  - 4.3 Movement Commands
  - 4.4 Filling and Line Breaking Commands
  - 4.5 Minor Modes
  - 4.6 Electric Keys and Keywords
  - 4.7 Auto-newline Insertion
  - 4.8 Hungry Deletion of Whitespace
  - 4.9 Subword Movement and Editing
  - 4.10 Other Commands
- 5 Font Locking
  - 5.1 Font Locking Preliminaries
  - 5.2 Faces
  - 5.3 Documentation Comments
  - 5.4 AWK Mode Font Locking
- 6 Configuration Basics
  - 6.1 Hooks
  - 6.2 Style Variables
  - 6.3 Styles
    - 6.3.1 Built-in Styles
    - 6.3.2 Choosing a Style
    - 6.3.3 Adding and Amending Styles
    - 6.3.4 Guessing the Style
    - 6.3.5 File Styles
- 7 Customizing Filling and Line Breaking
- 8 Customizing Auto-newlines
  - 8.1 Hanging Braces
    - 8.1.1 Custom Brace Hanging
  - 8.2 Hanging Colons
  - 8.3 Hanging Semicolons and Commas
- 9 Clean-ups
- 10 Indentation Engine Basics
  - 10.1 Syntactic Analysis
  - 10.2 Syntactic Symbols
    - 10.2.1 Function Symbols
    - 10.2.2 Class related Symbols
    - 10.2.3 Conditional Construct Symbols
    - 10.2.4 Switch Statement Symbols
    - 10.2.5 Brace List Symbols
    - 10.2.6 External Scope Symbols
    - 10.2.7 Parenthesis (Argument) List Symbols
    - 10.2.8 Comment String Label and Macro Symbols
    - 10.2.9 Multiline Macro Symbols
    - 10.2.10 Objective-C Method Symbols
    - 10.2.11 Java Symbols
    - 10.2.12 Statement Block Symbols
    - 10.2.13 K&R Symbols
  - 10.3 Indentation Calculation
- 11 Customizing Indentation
  - 11.1 c-offsets-alist
  - 11.2 Interactive Customization
  - 11.3 Line-Up Functions
    - 11.3.1 Brace and Parenthesis Line-Up Functions
    - 11.3.2 List Line-Up Functions
    - 11.3.3 Operator Line-Up Functions
    - 11.3.4 Comment Line-Up Functions
    - 11.3.5 Miscellaneous Line-Up Functions
  - 11.4 Custom Line-Up Functions
  - 11.5 Other Special Indentations
- 12 Customizing Macros
  - 12.1 Customizing Macro Backslashes
  - 12.2 Macros with semicolons
- 13 Odds and Ends
- Appendix A Sample Init File
- Appendix B Performance Issues
- Appendix C Limitations and Known Bugs
- Appendix D Frequently Asked Questions
- Appendix E Getting the Latest CC Mode Release
- Appendix F Mailing Lists and Submitting Bug Reports
- Appendix G GNU Free Documentation License
- Command and Function Index
- Variable Index
- Concept and Key Index

Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]

# CC Mode

CC Mode is a GNU Emacs mode for editing files containing C, C++, Objective-C, Java, CORBA IDL (and the variants PSDL and CIDL), Pike and AWK code. It provides syntax-based indentation, font locking, and has several handy commands and some minor modes to make the editing easier. It does not provide tools to look up and navigate between functions, classes, etc.; there are other packages for that.

This manual is for CC Mode in Emacs.

Copyright © 1995–2016 Free Software Foundation, Inc.

> Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual”, and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License”.

> (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.”

Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]