Author: djasper Date: Mon Sep 12 05:02:46 2016 New Revision: 281203 URL: http://llvm.org/viewvc/llvm-project?rev=281203&view=rev Log: 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! Modified: cfe/trunk/tools/clang-format/clang-format.el Modified: cfe/trunk/tools/clang-format/clang-format.el URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format.el?rev=281203&r1=281202&r2=281203&view=diff ============================================================================== --- cfe/trunk/tools/clang-format/clang-format.el (original) +++ cfe/trunk/tools/clang-format/clang-format.el Mon Sep 12 05:02:46 2016 @@ -122,7 +122,7 @@ is no active region. If no style is giv (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" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits