Next: Choosing a Style, Up: Styles [Contents][Index]
If you’re lucky, one of CC Mode’s built-in styles might be just what you’re looking for. These are:
gnu
¶Coding style blessed by the Free Software Foundation for C code in GNU programs.
k&r
¶The classic Kernighan and Ritchie style for C code. If you’re looking
for the style used in the 2nd edition of their book “The C
Programming Language”, then check out the stroustrup
style.
bsd
¶Also known as “Allman style” after Eric Allman.
whitesmith
¶Popularized by the examples that came with Whitesmiths C, an early commercial C compiler.
stroustrup
¶The classic Stroustrup style for C++ code.
ellemtel
¶Popular C++ coding standards as defined by “Programming in C++, Rules and Recommendations,” Erik Nyquist and Mats Henricson, Ellemtel19.
linux
¶C coding standard for Linux (the kernel).
python
¶C coding standard for Python extension modules20.
java
¶The style for editing Java code. Note that the default
value for c-default-style
installs this style when you enter
java-mode
.
awk
¶The style for editing AWK code. Note that the default value for
c-default-style
installs this style when you enter
awk-mode
.
user
¶This is a special style created by you. It consists of the factory
defaults for all the style variables as modified by the customizations
you do either with the Customization interface or by writing
setq
s and c-set-offset
s at the top level of your
.emacs file (see Configuration Basics). The style system creates
this style as part of its initialization and doesn’t modify it
afterwards.
This document is available at https://www.doc.ic.ac.uk/lab/cplus/c++.rules/ among other places.
Python is a high level scripting language with a C/C++ foreign function interface. For more information, see https://www.python.org/.
Next: Choosing a Style, Up: Styles [Contents][Index]