llvm.org GIT mirror llvm / 675e754
.emacs file bits for automatically setting the llvm.org coding style. Thanks Anton. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66032 91177308-0d34-0410-b5e6-96231b3b80d8 Mike Stump 10 years ago
1 changed file(s) with 24 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
99 '(c-basic-offset 2)
1010 '(indent-tabs-mode nil))
1111
12
13 ;; Alternative to setting the global style. Only files with "llvm" in
14 ;; their names will automatically set to the llvm.org coding style.
15 (c-add-style "llvm.org"
16 '((fill-column . 80)
17 (c++-indent-level . 2)
18 (c-basic-offset . 2)
19 (indent-tabs-mode . nil)))
20 (add-hook 'c-mode-hook
21 (function
22 (lambda nil
23 (if (string-match "llvm" buffer-file-name)
24 (progn
25 (c-set-style "llvm.org")
26 )
27 ))))
28 (add-hook 'c++-mode-hook
29 (function
30 (lambda nil
31 (if (string-match "llvm" buffer-file-name)
32 (progn
33 (c-set-style "llvm.org")
34 )
35 ))))