Use -Wl,defs when linking.
[oota-llvm.git] / utils / emacs / emacs.el
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++ code
5 (c-add-style "llvm.org"
6              '((fill-column . 80)
7                (c++-indent-level . 2)
8                (c-basic-offset . 2)
9                (indent-tabs-mode . nil)
10                (c-offsets-alist . ((arglist-intro . ++)
11                                    (innamespace . 0)
12                                    (member-init-intro . ++)
13                                    ))
14                ))
15
16 ;; Files with "llvm" in their names will automatically be set to the
17 ;; llvm.org coding style.
18 (add-hook 'c-mode-hook
19           (function
20            (lambda nil 
21              (if (string-match "llvm" buffer-file-name)
22                  (progn
23                    (c-set-style "llvm.org")
24                    )
25                ))))
26
27 (add-hook 'c++-mode-hook
28           (function
29            (lambda nil 
30              (if (string-match "llvm" buffer-file-name)
31                  (progn
32                    (c-set-style "llvm.org")
33                    )
34                ))))