add an emacs mode for our C coding style.

This commit is contained in:
Cedric Bail 2019-09-12 10:33:41 -07:00
parent aa190cb127
commit 1fe3a1d75d
1 changed files with 23 additions and 0 deletions

23
efl-mode.el Normal file
View File

@ -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)