aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Stephani2017-09-19 10:48:02 +0200
committerPhilipp Stephani2017-09-24 10:47:11 +0200
commit108df97bf7d9d93f9fe976ad1e52388920076eba (patch)
treee4fff0932effea2780c2b4c21757dca09b31bbd5
parent1eb4e5c3c8e70813c8042a38a2b67be74b16500e (diff)
downloademacs-108df97bf7d9d93f9fe976ad1e52388920076eba.tar.gz
emacs-108df97bf7d9d93f9fe976ad1e52388920076eba.zip
Add configuration for clang-format.
This allows developers to auto-format the C code with clang-format. It’s not 100% accurate, but works pretty well for most of the C code.
-rw-r--r--.clang-format27
1 files changed, 27 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000000..7895ada36da
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,27 @@
1Language: Cpp
2BasedOnStyle: LLVM
3AlignEscapedNewlinesLeft: true
4AlwaysBreakAfterReturnType: TopLevelDefinitions
5BreakBeforeBinaryOperators: All
6BreakBeforeBraces: GNU
7ColumnLimit: 80
8ContinuationIndentWidth: 2
9ForEachMacros: [FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE]
10IncludeCategories:
11 - Regex: '^<config\.h>$'
12 Priority: -1
13 - Regex: '^<'
14 Priority: 1
15 - Regex: '^"lisp\.h"$'
16 Priority: 2
17 - Regex: '.*'
18 Priority: 3
19KeepEmptyLinesAtTheStartOfBlocks: false
20MaxEmptyLinesToKeep: 1
21PenaltyBreakBeforeFirstCallParameter: 2000
22SpaceAfterCStyleCast: true
23SpaceBeforeParens: Always
24
25# Local Variables:
26# mode: yaml
27# End: