This is an archive of the discontinued LLVM Phabricator instance.

clang-format.el: Make clang-format work in indirect buffers.
ClosedPublic

Authored by phst on Feb 23 2022, 6:07 AM.

Details

Summary

In an indirect buffer, buffer-file-name is nil, so check the base buffer
instead. This works fine in direct buffers where buffer-base-buffer returns
nil.

Diff Detail

Event Timeline

phst requested review of this revision.Feb 23 2022, 6:07 AM
phst created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2022, 6:07 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sammccall accepted this revision.Feb 23 2022, 6:35 AM

Makes sense, thanks!

This revision is now accepted and ready to land.Feb 23 2022, 6:35 AM
phst added a comment.Feb 23 2022, 6:48 AM

Thanks for the review! I think you have to commit this (I don't have commit access).

This revision was landed with ongoing or failed builds.Feb 23 2022, 8:00 AM
This revision was automatically updated to reflect the committed changes.