Skip to content

Commit dc6e5f3

Browse files
leekilloughfgvanzee
authored andcommitted
Enhance emacs formatting of C files to remove trailing whitespace and ensure a newline at the end of file
1 parent 713d078 commit dc6e5f3

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.dir-locals.el

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
;; First (minimal) attempt at configuring Emacs CC mode for the BLIS
2-
;; layout requirements.
1+
;; Emacs C mode formatting for the BLIS layout requirements.
32
((c-mode . ((c-file-style . "stroustrup")
4-
(c-basic-offset . 4)
5-
(comment-start . "// ")
6-
(comment-end . "")
7-
(indent-tabs-mode . t)
8-
(tab-width . 4)
9-
(parens-require-spaces . nil))))
3+
(c-basic-offset . 4)
4+
(comment-start . "// ")
5+
(comment-end . "")
6+
(indent-tabs-mode . t)
7+
(tab-width . 4)
8+
(parens-require-spaces . nil)
9+
(require-final-newline . t)
10+
(eval add-hook `before-save-hook `delete-trailing-whitespace)
11+
)))

0 commit comments

Comments
 (0)