<div>+If called interactively uses the region or the current buffer if there</div><div>+is no active region.  If no style is given uses `clang-format-style'."</div><div><br></div><div>Doing full-buffer if nothing is selected is a usability problem if one works in an existing codebase; if no region is selected, it should just use the cursor position (which will get the current statement reflowed).</div><div>The idea is that the user can do clang-format-buffer if they insist.</div><div><br></div><div><div><div>+(put 'clang-format-executable 'risky-local-variable t)</div><div><br></div><div>Any reason not to use :risky in the defcustom?</div></div><div><br></div></div><div>Otherwise looks good; the main concern is using the full buffer if no region is specified.</div><br><div class="gmail_quote">On Mon Jan 05 2015 at 3:02:16 PM Daniel Jasper <<a href="mailto:djasper@google.com">djasper@google.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I really don't know enough emacs lisp to review this patch. Manuel, can you take a look?</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 3, 2015 at 9:27 AM, Daniel Jasper <span dir="ltr"><<a href="mailto:djasper@google.com" target="_blank">djasper@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I don't know much about emacs at all, but I'll experiment a bit with this patch on monday. This certainly seems like a great improvement. Thanks for working on it.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 2, 2015 at 12:13 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This looks really nice.<br>
<br>
Daniel, what do you think?<br>
<div><div><br>
On 29 December 2014 at 07:33, Johann Klähn <<a href="mailto:kljohann@gmail.com" target="_blank">kljohann@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> Some time ago, I uploaded a package[1] with essentially the same<br>
> functionality as tools/clang-format/clang-format.el to the Emacs package<br>
> archive MELPA. My version has several usability improvements and it has been<br>
> requested[2] that those changes are consolidated with the version in the cfe<br>
> tree. I would be happy to sunset my repository if this patch is accepted and<br>
> have the MELPA-package point to the cfe version.<br>
><br>
> * Includes file header/footer as required by MELPA<br>
> * Correctly handles buffers that are not associated with a file<br>
> * Displays stderr and exit code of clang-format process<br>
> * Is customizable via the Emacs customization interface and<br>
> file-/directory-local variables<br>
><br>
> As this is my first patch to this list, feel free to point out any silly<br>
> mistakes I did. :)<br>
><br>
> All the best,<br>
> Johann<br>
><br>
> [1]: <a href="https://github.com/kljohann/clang-format.el" target="_blank">https://github.com/kljohann/clang-format.el</a><br>
> [2]: <a href="https://github.com/milkypostman/melpa/issues/2202" target="_blank">https://github.com/milkypostman/melpa/issues/2202</a> and<br>
> <a href="https://github.com/kljohann/clang-format.el/issues/2" target="_blank">https://github.com/kljohann/clang-format.el/issues/2</a><br>
><br>
</div></div>> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</blockquote></div>