diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-04-18 17:49:08 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-04-18 18:44:13 +0200 |
commit | 6ea190f42924f74736fe21ec5bd38df105e39562 (patch) | |
tree | 2ad34581253d7280f9be53d317720c89ca1d05b5 | |
parent | 54682762caceae10c583e57548fe12d071d30fc1 (diff) | |
download | gnunet-6ea190f42924f74736fe21ec5bd38df105e39562.tar.gz gnunet-6ea190f42924f74736fe21ec5bd38df105e39562.zip |
add clang-format to emacs configuration (still requires clang-format to be installed globally first)
-rw-r--r-- | .dir-locals.el | 3 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | bootstrap | 3 |
3 files changed, 7 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 @@ | |||
1 | ;; Per-directory local variables for GNU Emacs 23 and later. | 1 | ;; Per-directory local variables for GNU Emacs 23 and later. |
2 | 2 | ||
3 | ((c-mode | ||
4 | (eval add-hook 'before-save-hook #'clang-format-buffer nil t))) | ||
5 | |||
3 | ((nil | 6 | ((nil |
4 | . ((fill-column . 78) | 7 | . ((fill-column . 78) |
5 | (tab-width . 4) | 8 | (tab-width . 4) |
diff --git a/.gitignore b/.gitignore index 31cfa5897..e898f41f8 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -11,6 +11,7 @@ | |||
11 | *.swp | 11 | *.swp |
12 | *.trs | 12 | *.trs |
13 | *.kdev4 | 13 | *.kdev4 |
14 | .clang-format | ||
14 | .deps/ | 15 | .deps/ |
15 | .libs/ | 16 | .libs/ |
16 | .svn/ | 17 | .svn/ |
@@ -3,6 +3,9 @@ | |||
3 | echo "Removing folder 'libltdl'..." | 3 | echo "Removing folder 'libltdl'..." |
4 | rm -rf libltdl | 4 | rm -rf libltdl |
5 | 5 | ||
6 | # Install clang format symlink (if possible) | ||
7 | ln -s contrib/conf/editors/clang-format .clang-format &> /dev/null | ||
8 | |||
6 | echo "checking for libtoolize / libtool... " | 9 | echo "checking for libtoolize / libtool... " |
7 | 10 | ||
8 | # This is more portable than `which' but comes with | 11 | # This is more portable than `which' but comes with |