Skip to content

Commit 7006d6f

Browse files
authored
Merge pull request #5321 from garazdawi/lukas/editorconfig
Add .editorconfig
2 parents 31c82b3 + 797f350 commit 7006d6f

File tree

5 files changed

+30
-9
lines changed

5 files changed

+30
-9
lines changed

.dir-locals.el

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
(java-mode (indent-tabs-mode . nil))
66
(perl-mode (indent-tabs-mode . nil))
77
(xml-mode (indent-tabs-mode . nil))
8-
;; In C code indentation is 4 spaces and in C++ 2 spaces
9-
;; erts/ overrides C++ to 4 spaces
108
(c++-mode
119
(indent-tabs-mode . nil)
12-
(c-basic-offset . 2))
10+
(c-basic-offset . 4))
1311
(c-mode
1412
(indent-tabs-mode . nil)
1513
(c-basic-offset . 4)))

.editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://EditorConfig.org
3+
;
4+
; To use this from emacs install the editorconfig package
5+
6+
root = true
7+
8+
[*]
9+
end_of_line = LF
10+
11+
[*]
12+
indent_style = space
13+
indent_size = 4
14+
insert_final_newline = true
15+
# Adding trim_trailing_whitespace removes trailing
16+
# from entire buffer on save and we do not want that
17+
# trim_trailing_whitespace = true
18+
19+
[{Makefile*,**.mk*}]
20+
# Use tabs for indentation (Makefiles require tabs)
21+
indent_style = tab

erts/.dir-locals.el

-6
This file was deleted.

lib/wx/.dir-locals.el

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
;; wx Emacs settings
2+
(
3+
;; In C++ code indentation is 2 spaces
4+
(c++-mode
5+
(indent-tabs-mode . nil)
6+
(c-basic-offset . 2)))

lib/wx/.editorconfig

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.{cpp,hpp}]
2+
indent_size = 2

0 commit comments

Comments
 (0)