summaryrefslogtreecommitdiff
path: root/.dir-locals.el
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-04-18 17:49:08 +0200
committerChristian Grothoff <christian@grothoff.org>2019-04-18 18:44:13 +0200
commit6ea190f42924f74736fe21ec5bd38df105e39562 (patch)
tree2ad34581253d7280f9be53d317720c89ca1d05b5 /.dir-locals.el
parent54682762caceae10c583e57548fe12d071d30fc1 (diff)
add clang-format to emacs configuration (still requires clang-format to be installed globally first)
Diffstat (limited to '.dir-locals.el')
-rw-r--r--.dir-locals.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index 687863811..29999b944 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,5 +1,8 @@
;; Per-directory local variables for GNU Emacs 23 and later.
+((c-mode
+ (eval add-hook 'before-save-hook #'clang-format-buffer nil t)))
+
((nil
. ((fill-column . 78)
(tab-width . 4)