This is an archive of the discontinued LLVM Phabricator instance.

Overhaul clang-rename.el.
ClosedPublic

Authored by phst on Oct 1 2016, 4:37 AM.

Details

Summary
  • Use lexical binding, as recommended for new libraries.
  • Fix customization variable (set correct group and type).
  • Create a new customization group for the library.
  • Autoload the main clang-rename command so that users don't have to explicitly load the library.
  • Correctly translate between file and buffer positions using bufferpos-to-filepos (if available) or a fallback.
  • Don't invoke the shell, it's not necessary and adds complexity.
  • Save clang-rename output in a buffer and display that on failure.
  • Save all buffers before calling clang-rename. This is required anyway and prevents data loss when the buffer is later reverted.
  • In revert-buffer, use keywords instead of t for Boolean arguments to improve readability.
  • Don't reset buffer modes when reverting.
  • Emacs treats the character after a symbol as part of the symbol, while clang-rename doesn't; resolve this inconsistency.
  • Formatting.

Diff Detail

Repository
rL LLVM

Event Timeline

phst updated this revision to Diff 73194.Oct 1 2016, 4:37 AM
phst retitled this revision from to Overhaul clang-rename.el..
phst updated this object.
phst added a reviewer: omtcyfz.
phst set the repository for this revision to rL LLVM.
phst added a project: Restricted Project.
omtcyfz edited edge metadata.Oct 2 2016, 6:30 AM

This is really great! Thank you so much for working on this!

Do you have commit access or should I land the patch?

omtcyfz accepted this revision.Oct 2 2016, 6:30 AM
omtcyfz edited edge metadata.
This revision is now accepted and ready to land.Oct 2 2016, 6:30 AM
phst added a comment.Oct 2 2016, 7:24 AM

I don't have commit access, would be great if you could commit it.

In D25156#558506, @phst wrote:

I don't have commit access, would be great if you could commit it.

Great; will do. Thank you very much once more!

This revision was automatically updated to reflect the committed changes.