summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar spwhitton <spwhitton@web>2015-12-05 19:52:17 +0000
committerGravatar admin <admin@branchable.com>2015-12-05 19:52:17 +0000
commite47e1d4793ff9c1a169e67b18b96531fce2135d0 (patch)
treeb8803c36c05dd0c17d48a272e9a4036f1a16dfd9
parent5d47b6385ea10158d63f5bcd8cd4cf46a27b4d74 (diff)
Copy hints for Emacs users from propellor coding style page
-rw-r--r--doc/coding_style.mdwn13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/coding_style.mdwn b/doc/coding_style.mdwn
index 6968c9958..288f52446 100644
--- a/doc/coding_style.mdwn
+++ b/doc/coding_style.mdwn
@@ -98,3 +98,16 @@ If you feel that this coding style leads to excessive amounts of horizontal
or vertical whitespace around your code, making it hard to fit enough of it
on the screen, consider finding a better abstraction, so the code that
does fit on the screen is easily understandable. ;)
+
+-----
+
+Note for emacs users: You can put the following snippet into a file called
+`.dir-locals.el` at root of git-annex's source tree to use tabs for indentation:
+
+ ((nil . ((indent-tabs-mode . t)
+ (tab-width . 8)
+ (fill-column . 80)))
+ ;; Warn about spaces used for indentation:
+ (haskell-mode . ((eval . (highlight-regexp "^ *")))))
+
+Also consider [haskell-tab-indent-mode](https://spwhitton.name/tech/code/haskell-tab-indent/). The standard indentation modes that come with haskell-mode do not work well with tabs for indentation. This mode works well for hacking on Propellor.