6.2 Style Variables

The variables that CC Mode’s style system control are called style variables. Note that style variables are ordinary Lisp variables, which the style system initializes; you can change their values at any time (e.g. in a hook function). The style system can also set other variables, to some extent. See Styles.

Style variables are handled specially in several ways:

The style variables are:
c-indent-comment-alist, c-indent-comments-syntactically-p (see Indentation Commands);
c-doc-comment-style (see Documentation Comments);
c-block-comment-prefix, c-comment-prefix-regexp (see Customizing Filling and Line Breaking);
c-hanging-braces-alist (see Hanging Braces);
c-hanging-colons-alist (see Hanging Colons);
c-hanging-semi&comma-criteria (see Hanging Semicolons and Commas);
c-cleanup-list (see Clean-ups);
c-basic-offset (see Customizing Indentation);
c-offsets-alist (see c-offsets-alist);
c-comment-only-line-offset (see Comment Line-Up Functions);
c-special-indent-hook, c-label-minimum-indentation (see Other Special Indentations);
c-backslash-column, c-backslash-max-column (see Customizing Macros).


Footnotes

(17)

This is a big change from versions of CC Mode earlier than 5.26, where such settings would get overridden by the style system unless special precautions were taken. That was changed since it was counterintuitive and confusing, especially to novice users. If your configuration depends on the old overriding behavior, you can set the variable c-old-style-variable-behavior to non-nil.

(18)

This did not change in version 5.26.