Performance Issues
Top
Getting the latest CC Mode release
c-mode-common-hook
(see the sample `.emacs
' file
Sample .emacs File):
(define-key c-mode-base-map "\C-m" 'newline-and-indent)
This is a very common question. If you want this to be the default
behavior, don't lobby me, lobby RMS! :-)
Q. I put (c-set-offset 'substatement-open 0)
in my `.emacs
' file but I get an error saying that c-set-offset
's function definition is void.
A. This means that CC Mode wasn't loaded into your
Emacs session by the time the c-set-offset
call was reached,
mostly likely because CC Mode is being autoloaded. Instead
of putting the c-set-offset
line in your top-level
`.emacs
' file, put it in your c-mode-common-hook
, or
simply add the following to the top of your `.emacs
' file:
(require 'cc-mode)
See the sample `.emacs
' file Sample .emacs File for
details.
Q. How do I make strings, comments, keywords, and other constructs appear in different colors, or in bold face, etc.?
A. ``Syntax Colorization'' is a standard Emacs feature,
controlled by font-lock-mode
. It is not part of CC Mode.
Q. M-a and M-e used to move over entire balanced brace lists, but now they move into blocks. How do I get the old behavior back?
A. Use C-M-f and C-M-b to move over balanced brace blocks. Use M-a and M-e to move by statements, which will move into blocks.