[LLVMdev] Emacs LLVM coding style dir-locals
sjcrane at uci.edu
Mon Oct 6 16:59:49 PDT 2014
Just wanted to share a trick I found for using the LLVM coding style in
Emacs, although I'm sure this is nothing new to veterans around here.
There's an LLVM coding style emacs plugin in /utils/emacs/emacs.el. However
this uses a string match against "llvm" to try to guess if the current
directory contains llvm sources. A simpler method is to use Emacs directory
variable support (
Just drop the following lines into a .dir-locals.el file in the root of the
LLVM sources, and all files in the source tree will pick up the correct
((nil . ((indent-tabs-mode . nil)
(fill-column . 80)
(c++-indent-level . 2)
(c-base-offset . 2)
(c-offsets-alist . ((innamespace . 0))))))
I hope this helps someone!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev