summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2019-09-12 10:33:41 -0700
committerCedric Bail <cedric.bail@free.fr>2019-09-12 10:33:41 -0700
commit1fe3a1d75dfb36881665130e3a1230fd44e81791 (patch)
treeb780a0dbc9afebb7c4ecc6ce95013099b3fc5077
parentaa190cb127749c90392b7b1288758ba0ee422b95 (diff)
add an emacs mode for our C coding style.HEADmaster
-rw-r--r--efl-mode.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/efl-mode.el b/efl-mode.el
new file mode 100644
index 0000000..80e243b
--- /dev/null
+++ b/efl-mode.el
@@ -0,0 +1,23 @@
1(c-add-style
2 "efl"
3 '("gnu"
4 (show-trailing-whitespace t)
5 (indent-tabs-mode . nil)
6 (tab-width . 8)
7 (c-offsets-alist .
8 ((defun-block-intro . 3)
9 (statement-block-intro . 3)
10 (case-label . 1)
11 (statement-case-intro . 3)
12 (inclass . 3)
13))))
14
15(defun efl-c-mode-hooks ()
16 (let ((path (buffer-file-name)))
17 (cond
18 ((string-match "/efl/src/" path) (c-set-style "efl"))
19)))
20
21(add-hook 'c-mode-common-hook 'efl-c-mode-hooks)
22
23(provide 'efl-mode)