cedric pushed a commit to branch master.

http://git.enlightenment.org/editors/emacs-configs.git/commit/?id=1fe3a1d75dfb36881665130e3a1230fd44e81791

commit 1fe3a1d75dfb36881665130e3a1230fd44e81791
Author: Cedric Bail <cedric.b...@free.fr>
Date:   Thu Sep 12 10:33:41 2019 -0700

    add an emacs mode for our C coding style.
---
 efl-mode.el | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

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 @@
+(c-add-style
+ "efl"
+ '("gnu"
+   (show-trailing-whitespace t)
+   (indent-tabs-mode . nil)
+   (tab-width . 8)
+   (c-offsets-alist .
+                   ((defun-block-intro . 3)
+                    (statement-block-intro . 3)
+                    (case-label . 1)
+                    (statement-case-intro . 3)
+                    (inclass . 3)
+))))
+
+(defun efl-c-mode-hooks ()
+     (let ((path (buffer-file-name)))
+     (cond
+      ((string-match "/efl/src/" path) (c-set-style "efl"))
+)))
+
+(add-hook 'c-mode-common-hook 'efl-c-mode-hooks)
+
+(provide 'efl-mode)

-- 


Reply via email to