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 Configuration Basics), this setting will override the one that the style system would have given the variable.
This variable specifies which style to install by default in new buffers. It takes either a style name string, or an association list of major mode symbols to style names:
c-default-style is a string, it must be an existing style
name. This style is then used for all modes.
c-default-style is an association list, the mode language
is looked up to find a style name string.
c-default-style is 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.
In all cases, the style described in
c-default-style is installed
before the language hooks are run, so you can always override
this setting by including an explicit call to
c-set-style in your
language mode hook, or in
The standard value of
((java-mode . "java") (awk-mode . "awk") (other . "gnu")).
This variable always contains the buffer’s current style name, as a string.