Skip to content

Commit e54c7f8

Browse files
committed
[dir-locals] Use llbuild style for C files.
1 parent 2d89733 commit e54c7f8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.dir-locals.el

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@
1919
(require 'llbuild-project-settings))))
2020

2121
(c++-mode
22+
;; Load the llbuild style, if available.
23+
;;
24+
;; We have to do deferred loading of the style like this (instead of just
25+
;; setting the c-file-style variable, so that this works even when we are
26+
;; auto-loading llbuild-project-settings. Otherwise, that would fail since
27+
;; dir-locals evaluates the variables before it evaluates the eval list.
28+
(eval .
29+
(if (assoc "llbuild" c-style-alist)
30+
(c-set-style "llbuild"))))
31+
32+
(c-mode
2233
;; Load the llbuild style, if available.
2334
;;
2435
;; We have to do deferred loading of the style like this (instead of just

0 commit comments

Comments
 (0)