Add .dir-locals and set c-basic-offset to 2.

This makes it easier for emacs users to automatically get the right
2-space indentation when they edit curl source files.

c++-mode is in there as well because Emacs can't easily know if
something is a C or C++ header.

Closes #574

Anders Bakken 3 years ago
parent
commit
04cb90948e
1 changed files with 10 additions and 0 deletions
  1. 10 0
      .dir-locals.el

+ 10 - 0
.dir-locals.el

@@ -0,0 +1,10 @@
1
+;;; Directory Local Variables
2
+;;; See Info node `(emacs) Directory Variables' for more information.
3
+
4
+((nil . ((indent-tabs-mode . nil)
5
+         (show-trailing-whitespace . t)))
6
+ (c-mode . ((c-basic-offset . 2)
7
+            ))
8
+ (c++-mode . ((c-basic-offset . 2)
9
+              ))
10
+ )