This revision was automatically updated to reflect the committed changes.
Closed by commit rC319621: Fix assume-filename handling in clang-format.el
(authored by phst).
Changed prior to commit:
https://reviews.llvm.org/D37903?vs=124242&id=125274#toc
Repository:
rC Clang
https://reviews.llvm
werbitt updated this revision to Diff 124242.
werbitt edited the summary of this revision.
werbitt added a comment.
Updating for upstream head
https://reviews.llvm.org/D37903
Files:
tools/clang-format/clang-format.el
Index: tools/clang-format/clang-format.el
phi added a comment.
The patch doesn't apply any more to upstream head:
$ arc patch D37903
patching file tools/clang-format/clang-format.el
Hunk #1 FAILED at 122.
Hunk #2 FAILED at 193.
Could you please rebase it?
https://reviews.llvm.org/D37903
_
phi added a comment.
Hi, do you need anything more from us? This patch looks fine and can be
submitted.
https://reviews.llvm.org/D37903
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
werbitt updated this revision to Diff 117574.
werbitt added a comment.
Use uppercase when referring to arguments
https://reviews.llvm.org/D37903
Files:
tools/clang-format/clang-format.el
Index: tools/clang-format/clang-format.el
==
phst accepted this revision.
phst added inline comments.
Comment at: tools/clang-format/clang-format.el:126
+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
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
phst added inline comments.
Comment at: tools/clang-format/clang-format.el:122
;;;###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 loca
werbitt updated this revision to Diff 116605.
werbitt added a comment.
Cleanup Docs
- The first line of of an emacs docstring should be a complete sentence.
-Specify that "-assume-filname" is a clang-format option
https://reviews.llvm.org/D37903
Files:
tools/clang-format/clang-format.el
I
werbitt reclaimed this revision.
werbitt added a comment.
This revision is now accepted and ready to land.
It looks like I just uploaded a diff against a bad branch, and I can't figure
out how to undo it. Sorry about that.
https://reviews.llvm.org/D37903
_
phst added inline comments.
Comment at: tools/clang-format/clang-format.el:123
+(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 confi
werbitt updated this revision to Diff 115875.
werbitt edited the summary of this revision.
werbitt added a comment.
Rename assume-file to assume-file-name and update documentation
https://reviews.llvm.org/D37903
Files:
tools/clang-format/clang-format.el
Index: tools/clang-format/clang-forma
phst accepted this revision.
phst added a comment.
This revision is now accepted and ready to land.
Your use case sounds good to me. Please be sure to document the new parameter,
though.
Comment at: tools/clang-format/clang-format.el:154
+ `("-outpu
phst added inline comments.
Comment at: tools/clang-format/clang-format.el:125
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'."
(interactive
Please document the A
werbitt added a comment.
Hi,
Thank you very much for your feedback.
I submitted a bug here:
https://bugs.llvm.org/show_bug.cgi?id=34667
I made the changes you suggested, but I left the assume-filename optional
argument for now.
My current use-case is that when I'm editing a source block in an
werbitt updated this revision to Diff 115827.
werbitt added a comment.
Clean up call-process-region
- Quote call-process-region with #', this will cause a compile time error if
call-process-region is undefined
- Pass positional arguments normally (exclude from the list)
- Instead of using append
phst added a comment.
Thanks, generally looks good, but a couple of notes:
- This is actually a bug in clang-format, which can easily be triggered with
`clang-format -output-replacements-xml -assume-filename '' -offset 0 -length 10
-cursor 5 <<< ' = 1234;'`
It's fine to work around bugs,
klimek added a reviewer: phst.
klimek added a comment.
+Philipp, who is our emacs expert :)
https://reviews.llvm.org/D37903
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
werbitt created this revision.
When 'buffer-file-name' is nil 'call-process-region' returned a segmentation
fault error.
This was a problem when using clang-format-buffer on an orgmode source code
editing buffer.
I fixed this problem by excluding the '-assume-filename' argument when
'buffer-f
19 matches
Mail list logo