summaryrefslogtreecommitdiff
path: root/tools/clang-format/clang-format.el
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-09-02 07:42:02 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-09-02 07:42:02 +0000
commit439fc85f4663810984962a8346d000be79df6bdc (patch)
treed90db25e2ee5c4886ef9e365d70c7243e9b8cbd2 /tools/clang-format/clang-format.el
parent0180688aaa08be6f4cfc1ba599371a94cdede233 (diff)
downloadclang-439fc85f4663810984962a8346d000be79df6bdc.tar.gz
clang-439fc85f4663810984962a8346d000be79df6bdc.tar.bz2
clang-439fc85f4663810984962a8346d000be79df6bdc.tar.xz
Switch the default mode for clang-format to '-file'. Make 'LLVM' the
fallback syntax used when we fail to find a '.clang-format' file. Adjust variable names appropriately. Update the editor integration pieces that specify a '-style' option to specify it as '-style=file'. I left the functionality in place because even if the preferred method is to use '.clang-format' files, this way if someone needs to clobber the style in their editor we show how to do so in these examples. Also check in a '.clang-format' file for Clang to ensure that separate checkouts and builds of Clang from LLVM can still get the nice formatting. =] This unfortunately required nuking the test for the absence of a '.clang-format' file as now the directory happening to be under your clang source tree will cause there to always be a file. ;] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-format/clang-format.el')
-rw-r--r--tools/clang-format/clang-format.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/clang-format/clang-format.el b/tools/clang-format/clang-format.el
index b0131ed319..531635e8ec 100644
--- a/tools/clang-format/clang-format.el
+++ b/tools/clang-format/clang-format.el
@@ -36,7 +36,7 @@
(let* ((orig-windows (get-buffer-window-list (current-buffer)))
(orig-window-starts (mapcar #'window-start orig-windows))
(orig-point (point))
- (style "LLVM"))
+ (style "file"))
(unwind-protect
(call-process-region (point-min) (point-max) clang-format-binary t t nil
"-offset" (number-to-string (1- begin))