[RISCV] Regenerate autogen test to remove spurious diff
[llvm-project.git] / llvm / utils / emacs / emacs.el
blob3a2b47cee1db138a13c2b9a7241f81dd69879c59
1 ;; LLVM coding style guidelines in emacs
2 ;; Maintainer: LLVM Team, http://llvm.org/
4 (defun llvm-lineup-statement (langelem)
5 (let ((in-assign (c-lineup-assignments langelem)))
6 (if (not in-assign)
7 '++
8 (aset in-assign 0
9 (+ (aref in-assign 0)
10 (* 2 c-basic-offset)))
11 in-assign)))
13 ;; Add a cc-mode style for editing LLVM C and C++ code
14 (c-add-style "llvm.org"
15 '("gnu"
16 (fill-column . 80)
17 (c++-indent-level . 2)
18 (c-basic-offset . 2)
19 (indent-tabs-mode . nil)
20 (c-offsets-alist . ((arglist-intro . ++)
21 (innamespace . 0)
22 (member-init-intro . ++)
23 (statement-cont . llvm-lineup-statement)))))
25 ;; Files with "llvm" in their names will automatically be set to the
26 ;; llvm.org coding style.
27 (add-hook 'c-mode-common-hook
28 (function
29 (lambda nil
30 (if (string-match "llvm" buffer-file-name)
31 (progn
32 (c-set-style "llvm.org"))))))