diff --git a/.dir-locals.el b/.dir-locals.el index 860f2248a8b2..b6586cba03d1 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -6,11 +6,9 @@ (java-mode (indent-tabs-mode . nil)) (perl-mode (indent-tabs-mode . nil)) (xml-mode (indent-tabs-mode . nil)) - ;; In C code indentation is 4 spaces and in C++ 2 spaces - ;; erts/ overrides C++ to 4 spaces (c++-mode (indent-tabs-mode . nil) - (c-basic-offset . 2)) + (c-basic-offset . 4)) (c-mode (indent-tabs-mode . nil) (c-basic-offset . 4))) diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000000..49104b1d5c45 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://EditorConfig.org +; +; To use this from emacs install the editorconfig package + +root = true + +[*] +end_of_line = LF + +[*] +indent_style = space +indent_size = 4 +insert_final_newline = true +# Adding trim_trailing_whitespace removes trailing +# from entire buffer on save and we do not want that +# trim_trailing_whitespace = true + +[{Makefile*,**.mk*}] +# Use tabs for indentation (Makefiles require tabs) +indent_style = tab diff --git a/erts/.dir-locals.el b/erts/.dir-locals.el deleted file mode 100644 index 37b636dfad58..000000000000 --- a/erts/.dir-locals.el +++ /dev/null @@ -1,6 +0,0 @@ -;; erts Emacs settings -( - ;; In C++ code indentation is 4 spaces - (c++-mode - (indent-tabs-mode . nil) - (c-basic-offset . 4))) diff --git a/lib/wx/.dir-locals.el b/lib/wx/.dir-locals.el new file mode 100644 index 000000000000..37133c709f17 --- /dev/null +++ b/lib/wx/.dir-locals.el @@ -0,0 +1,6 @@ +;; wx Emacs settings +( + ;; In C++ code indentation is 2 spaces + (c++-mode + (indent-tabs-mode . nil) + (c-basic-offset . 2))) diff --git a/lib/wx/.editorconfig b/lib/wx/.editorconfig new file mode 100644 index 000000000000..9729751b7174 --- /dev/null +++ b/lib/wx/.editorconfig @@ -0,0 +1,2 @@ +[*.{cpp,hpp}] +indent_size = 2