When you create a new buffer, its style will be set from
c-default-style. The factory default is the style
except in Java and AWK modes where it's
Remember that if you set a style variable with the Customization interface or at the top level of your .emacs file before the style system is initialized (see Config Basics), this setting will override the one that the style system would have given the variable.
To set a buffer's style interactively, use the command C-c . (see Other Commands). To set it from a file's local variable list, File Styles.
c-default-styleis a string, it must be an existing style name. This style is then used for all modes.
c-default-styleis an association list, the mode language is looked up to find a style name string.
c-default-styleis an association list where the mode language mode isn't found then the special symbol ‘other’ is looked up. If it's found then the associated style is used.
- If ‘other’ is not found then the ‘gnu’ style is used.
In all cases, the style described in
c-default-styleis installed before the language hooks are run, so you can always override this setting by including an explicit call to
c-set-stylein your language mode hook, or in
The standard value of
((java-mode . "java") (awk-mode . "awk") (other . "gnu")).