Questions tagged [cc-mode]

Major mode for C, C++, Objective-C, Java, CORBA IDL, Pike, AWK. Included in GNU Emacs and XEmacs.

Filter by
Sorted by
Tagged with
10
votes
3answers
3k views

before-save-hook for cc-mode

I want to customize cc-mode to execute a function before saving. One solution would be to modify cc-mode keymap to bind C-x C-s to a function which performs the work I need and then saves it. My ...
6
votes
2answers
919 views

Change the way CC-mode font-lock the C++11 `auto` syntax

With C++11, the keyword auto attained a new syntax and semantics. However, it seems that CC-mode has not been aware of this. For example, if I write auto var = exp, I get var in green, in which ...
4
votes
2answers
670 views

CC-Mode - Javadoc Comment Colors in C/C++

I've been fiddling around a bit with CC-mode lately and figured that since I prefer to comment my functions/classes with javadoc-like syntax, I'd like to use the built-in comment highlighting provided ...
6
votes
3answers
759 views

Customizing c-mode indentation behavior in Emacs 24.4

Before Emacs 24.4, indentation in c-mode happened after typing things like ;, , and so on and I like this behavior. But in Emacs 24.4, c-mode also indents on RET. This causes a lot of problems for me ...
2
votes
2answers
2k views

Indentation after braces in C

I don't know what the formal name of it is (this being one of the reasons that I can't find how to achieve it). But, what I want is to make Emacs start the second bracket with the same amount of space ...