A C style is a collection of indentation style customizations.
Emacs comes with several predefined indentation styles for C code
cc-mode. The default style is
To choose the style you want, use the command M-x c-set-style. Specify a style name as an argument (case is not significant in C style names). The chosen style only affects newly visited buffers, not those you are already editing.
To define a new C indentation style, call the function
(c-add-style name values use-now)
Here name is the name of the new style (a string), and
values is an alist whose elements have the form
(variable . value). The variables you specify should
be among those documented in section Variables for C Indentation.
If use-now is non-
c-add-style switches to the
new style after defining it.
Go to the first, previous, next, last section, table of contents.