kljohann / clang-format.el

Format code using clang-format
4 stars 0 forks source link

Get this merged into cfe/tools #2

Closed kljohann closed 9 years ago

kljohann commented 9 years ago

See milkypostman/melpa#2202. The major difference to the cfe version seems to be defcustoms, displaying return code / stderr-output and package.el-compatibility.

Sarcasm commented 9 years ago

Any progress on this? :)

I would like to add special support for Clang format someday in irony-mode and having only one Clang format in the wild may be nice (not sure I will depend on it or not yet).

kljohann commented 9 years ago

Hi, I just added some aliases to support calls using the cfe/tools function signature. I will send a patch to the mailing list next week :)

Sarcasm commented 9 years ago

Great :)

kljohann commented 9 years ago

Okay, I finally got around to doing this :) http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141229/120600.html

Sarcasm commented 9 years ago

If you do not get any response you may want to try by using Phabricator which is what the LLVM folks use for code review, see http://llvm.org/docs/Phabricator.html

The Phabricator URL is http://reviews.llvm.org/

IIRC, you can connect through your Github account, using OAuth.

kljohann commented 9 years ago

landed in r225447. :)

Sarcasm commented 9 years ago

Great!

It is my understand that maybe another change will land that will no longer erase the whole buffer? That would be great! Hopefully that will also play better with undo which right now doesn't play very nicely...

Any reason to require json 1.3 instead of 1.2? I think 1.2 is available built-in some Emacs versions (23.1).

kljohann commented 9 years ago

Yes, see this mail to cfe-commits or ed4bac9ed0b7 on the xml branch. I now use the -output-replacements-xml option of clang-format, which does not yet return the calculated cursor position in 3.5. That said, the position the cursor ends up in isn't too far off in most cases. :) Btw. I no longer require json but cl-lib 0.3. Do you know the first version of emacs that included this?

Sarcasm commented 9 years ago

Apparently Emacs 24.3 ships with cl-lib 1.0. This is the first time it was built-in Emacs.