llvm.org GIT mirror llvm / f1f6524
Improve emacs coding style Remove setting of default style, this way is not recommended and means that all the settings have to be duplicated to demonstrate the c-add-style method which is a much better way of doing it. Remove the modified date as it is better stored in SVN. Tweak a few style parameters to make them conform to the actual LLVM style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223765 91177308-0d34-0410-b5e6-96231b3b80d8 Will Newton 4 years ago
1 changed file(s) with 8 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
0 ;; LLVM coding style guidelines in emacs
11 ;; Maintainer: LLVM Team, http://llvm.org/
2 ;; Modified: 2009-07-28
32
4 ;; Max 80 cols per line, indent by two spaces, no tabs.
5 ;; Apparently, this does not affect tabs in Makefiles.
6 (custom-set-variables
7 '(fill-column 80)
8 '(c++-indent-level 2)
9 '(c-basic-offset 2)
10 '(indent-tabs-mode nil))
11
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.
3 ;; Add a cc-mode style for editing LLVM C++ code
154 (c-add-style "llvm.org"
165 '((fill-column . 80)
176 (c++-indent-level . 2)
187 (c-basic-offset . 2)
198 (indent-tabs-mode . nil)
20 (c-offsets-alist . ((innamespace 0)))))
9 (c-offsets-alist . ((arglist-intro . ++)
10 (innamespace . 0)
11 (member-init-intro . ++)
12 ))
13 ))
2114
15 ;; Files with "llvm" in their names will automatically be set to the
16 ;; llvm.org coding style.
2217 (add-hook 'c-mode-hook
2318 (function
2419 (lambda nil