+If called interactively uses the region or the current buffer if there +is no active region. If no style is given uses `clang-format-style'."
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). The idea is that the user can do clang-format-buffer if they insist. +(put 'clang-format-executable 'risky-local-variable t) Any reason not to use :risky in the defcustom? Otherwise looks good; the main concern is using the full buffer if no region is specified. On Mon Jan 05 2015 at 3:02:16 PM Daniel Jasper <[email protected]> wrote: > I really don't know enough emacs lisp to review this patch. Manuel, can > you take a look? > > On Sat, Jan 3, 2015 at 9:27 AM, Daniel Jasper <[email protected]> wrote: > >> 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. >> >> On Fri, Jan 2, 2015 at 12:13 AM, Rafael Espíndola < >> [email protected]> wrote: >> >>> This looks really nice. >>> >>> Daniel, what do you think? >>> >>> On 29 December 2014 at 07:33, Johann Klähn <[email protected]> wrote: >>> > Hi all, >>> > >>> > Some time ago, I uploaded a package[1] with essentially the same >>> > functionality as tools/clang-format/clang-format.el to the Emacs >>> package >>> > archive MELPA. My version has several usability improvements and it >>> has been >>> > requested[2] that those changes are consolidated with the version in >>> the cfe >>> > tree. I would be happy to sunset my repository if this patch is >>> accepted and >>> > have the MELPA-package point to the cfe version. >>> > >>> > * Includes file header/footer as required by MELPA >>> > * Correctly handles buffers that are not associated with a file >>> > * Displays stderr and exit code of clang-format process >>> > * Is customizable via the Emacs customization interface and >>> > file-/directory-local variables >>> > >>> > As this is my first patch to this list, feel free to point out any >>> silly >>> > mistakes I did. :) >>> > >>> > All the best, >>> > Johann >>> > >>> > [1]: https://github.com/kljohann/clang-format.el >>> > [2]: https://github.com/milkypostman/melpa/issues/2202 and >>> > https://github.com/kljohann/clang-format.el/issues/2 >>> > >>> > _______________________________________________ >>> > cfe-commits mailing list >>> > [email protected] >>> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >>> > >>> >> >> >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
