From: Daniel Jasper Date: Mon, 12 Sep 2016 10:02:46 +0000 (+0000) Subject: clang-format: Make emacs integration work with narrowed buffers. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ca4899ca014e98068ad920e023ec283341c0913;p=clang clang-format: Make emacs integration work with narrowed buffers. Use (call-process region nil ...) instead of (point-min) so that the call works in narrowed buffers. Patch by Philipp Stephani, thank you! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281203 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/clang-format/clang-format.el b/tools/clang-format/clang-format.el index ca461444e2..4d6007925f 100644 --- a/tools/clang-format/clang-format.el +++ b/tools/clang-format/clang-format.el @@ -122,7 +122,7 @@ is no active region. If no style is given uses `clang-format-style'." (let (status stderr operations) (setq status (call-process-region - (point-min) (point-max) clang-format-executable + nil nil clang-format-executable nil `(,temp-buffer ,temp-file) nil "-output-replacements-xml"