r181303 - Further fix to clang-format emacs integration.

Daniel Jasper djasper at google.com
Tue May 7 03:04:47 PDT 2013


Author: djasper
Date: Tue May  7 05:04:47 2013
New Revision: 181303

URL: http://llvm.org/viewvc/llvm-project?rev=181303&view=rev
Log:
Further fix to clang-format emacs integration.

This is just a slight improvement for the fix in r181299, which fixes
formatting the very last line of a file.

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=181303&r1=181302&r2=181303&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/clang-format.el (original)
+++ cfe/trunk/tools/clang-format/clang-format.el Tue May  7 05:04:47 2013
@@ -20,7 +20,7 @@
         (setq beg (region-beginning)
               end (region-end))
       (setq beg (min (line-beginning-position) (1- (point-max)))
-            end (min (line-end-position) (1- (point-max)))))
+            end (line-end-position)))
     (call-process-region (point-min) (point-max) binary t t nil
                          "-offset" (number-to-string (1- beg))
                          "-length" (number-to-string (- end beg))





More information about the cfe-commits mailing list