werbitt updated this revision to Diff 117500.
werbitt added a comment.

Thanks, I was too hasty when I tried to fix the mess I created when I diffed 
against an updated master and uploaded it without noticing. I believe this diff 
gets me back to where I intended.


https://reviews.llvm.org/D37903

Files:
  tools/clang-format/clang-format.el


Index: tools/clang-format/clang-format.el
===================================================================
--- tools/clang-format/clang-format.el
+++ tools/clang-format/clang-format.el
@@ -120,11 +120,11 @@
 
 ;;;###autoload
 (defun clang-format-region (start end &optional style assume-file-name)
-  "Use clang-format to format the code between START and END according to STYLE
-using ASSUME-FILE-NAME to locate a style config file. If called interactively
-uses the region or the current statement if there is no active region. If no
-style is given uses `clang-format-style'. If no assume-file-name is given uses
-`buffer-file-name'."
+  "Use clang-format to format the code between START and END according to 
STYLE.
+If called interactively uses the region or the current statement if there is no
+no active region. If no style is given uses `clang-format-style'. Use
+ASSUME-FILE-NAME to locate a style config file, if no  assume-file-name is 
given
+uses the function `buffer-file-name'."
   (interactive
    (if (use-region-p)
        (list (region-beginning) (region-end))
@@ -154,8 +154,9 @@
                              nil `(,temp-buffer ,temp-file) nil
                              `("-output-replacements-xml"
                                ;; Gaurd against a nil assume-file-name.
-                               ;; If -assume-filename is given a blank string
-                               ;; it will crash as per the following bug report
+                               ;; If the clang-format option -assume-filename
+                               ;; is given a blank string it will crash as per
+                               ;; the following bug report
                                ;; https://bugs.llvm.org/show_bug.cgi?id=34667
                                ,@(and assume-file-name
                                       (list "-assume-filename" 
assume-file-name))
@@ -191,9 +192,10 @@
 
 ;;;###autoload
 (defun clang-format-buffer (&optional style assume-file-name)
-  "Use clang-format to format the current buffer according to STYLE using
-ASSUME-FILE-NAME to locate a style config file. If no style is given uses
-`clang-format-style'. If no assume-file-name is given uses `buffer-file-name'."
+  "Use clang-format to format the current buffer according to STYLE.
+If no style is given uses `clang-format-style'. Use ASSUME-FILE-NAME
+to locate a style config file. If no assume-file-name is given uses
+the function `buffer-file-name'."
   (interactive)
   (clang-format-region (point-min) (point-max) style assume-file-name))
 


Index: tools/clang-format/clang-format.el
===================================================================
--- tools/clang-format/clang-format.el
+++ tools/clang-format/clang-format.el
@@ -120,11 +120,11 @@
 
 ;;;###autoload
 (defun clang-format-region (start end &optional style assume-file-name)
-  "Use clang-format to format the code between START and END according to STYLE
-using ASSUME-FILE-NAME to locate a style config file. If called interactively
-uses the region or the current statement if there is no active region. If no
-style is given uses `clang-format-style'. If no assume-file-name is given uses
-`buffer-file-name'."
+  "Use clang-format to format the code between START and END according to STYLE.
+If called interactively uses the region or the current statement if there is no
+no active region. If no style is given uses `clang-format-style'. Use
+ASSUME-FILE-NAME to locate a style config file, if no  assume-file-name is given
+uses the function `buffer-file-name'."
   (interactive
    (if (use-region-p)
        (list (region-beginning) (region-end))
@@ -154,8 +154,9 @@
                              nil `(,temp-buffer ,temp-file) nil
                              `("-output-replacements-xml"
                                ;; Gaurd against a nil assume-file-name.
-                               ;; If -assume-filename is given a blank string
-                               ;; it will crash as per the following bug report
+                               ;; If the clang-format option -assume-filename
+                               ;; is given a blank string it will crash as per
+                               ;; the following bug report
                                ;; https://bugs.llvm.org/show_bug.cgi?id=34667
                                ,@(and assume-file-name
                                       (list "-assume-filename" assume-file-name))
@@ -191,9 +192,10 @@
 
 ;;;###autoload
 (defun clang-format-buffer (&optional style assume-file-name)
-  "Use clang-format to format the current buffer according to STYLE using
-ASSUME-FILE-NAME to locate a style config file. If no style is given uses
-`clang-format-style'. If no assume-file-name is given uses `buffer-file-name'."
+  "Use clang-format to format the current buffer according to STYLE.
+If no style is given uses `clang-format-style'. Use ASSUME-FILE-NAME
+to locate a style config file. If no assume-file-name is given uses
+the function `buffer-file-name'."
   (interactive)
   (clang-format-region (point-min) (point-max) style assume-file-name))
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to