• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1;; LLVM coding style guidelines in emacs
2;; Maintainer: LLVM Team, http://llvm.org/
3
4;; Add a cc-mode style for editing LLVM C and C++ code
5(c-add-style "llvm.org"
6             '("gnu"
7	       (fill-column . 80)
8	       (c++-indent-level . 2)
9	       (c-basic-offset . 2)
10	       (indent-tabs-mode . nil)
11	       (c-offsets-alist . ((arglist-intro . ++)
12				   (innamespace . 0)
13				   (member-init-intro . ++)))))
14
15;; Files with "llvm" in their names will automatically be set to the
16;; llvm.org coding style.
17(add-hook 'c-mode-common-hook
18	  (function
19	   (lambda nil
20	     (if (string-match "llvm" buffer-file-name)
21		 (progn
22		   (c-set-style "llvm.org"))))))
23