2005-04-24 17:09:19 +00:00
|
|
|
;; LLVM coding style guidelines in emacs
|
2006-03-14 06:05:05 +00:00
|
|
|
;; Maintainer: LLVM Team, http://llvm.org/
|
2005-04-24 17:09:19 +00:00
|
|
|
|
2015-01-22 20:56:25 +00:00
|
|
|
;; Add a cc-mode style for editing LLVM C and C++ code
|
2009-03-04 14:14:37 +00:00
|
|
|
(c-add-style "llvm.org"
|
2015-01-22 20:56:25 +00:00
|
|
|
'("gnu"
|
|
|
|
(fill-column . 80)
|
2009-03-04 14:14:37 +00:00
|
|
|
(c++-indent-level . 2)
|
|
|
|
(c-basic-offset . 2)
|
2009-07-28 17:34:57 +00:00
|
|
|
(indent-tabs-mode . nil)
|
2014-12-09 08:58:31 +00:00
|
|
|
(c-offsets-alist . ((arglist-intro . ++)
|
|
|
|
(innamespace . 0)
|
2015-01-22 20:56:25 +00:00
|
|
|
(member-init-intro . ++)))))
|
2009-07-28 17:34:57 +00:00
|
|
|
|
2014-12-09 08:58:31 +00:00
|
|
|
;; Files with "llvm" in their names will automatically be set to the
|
|
|
|
;; llvm.org coding style.
|
2015-01-22 20:56:25 +00:00
|
|
|
(add-hook 'c-mode-common-hook
|
2009-03-04 14:14:37 +00:00
|
|
|
(function
|
|
|
|
(lambda nil
|
|
|
|
(if (string-match "llvm" buffer-file-name)
|
|
|
|
(progn
|
2015-01-22 20:56:25 +00:00
|
|
|
(c-set-style "llvm.org"))))))
|