Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix #551] Indent clojure-align region before aligning. #552

Merged
merged 1 commit into from
Mar 21, 2020
Merged

[Fix #551] Indent clojure-align region before aligning. #552

merged 1 commit into from
Mar 21, 2020

Conversation

kylc
Copy link
Contributor

@kylc kylc commented Jan 24, 2020

This prevents issues when aligning improperly indented code. Before, the region
would be aligned while retaining the improper indentation. The follow-up
indentation step would then break the alignment that was just performed.

With this commit, we switch the order by indenting first then aligning. This
retains compatibility with the test cases in #360.


  • The commits are consistent with our contribution guidelines.
  • You've added tests (if possible) to cover your change(s). Bugfix, indentation, and font-lock tests are extremely important!
  • You've run M-x checkdoc and fixed any warnings in the code you've written.
  • You've updated the changelog (if adding/changing user-visible functionality).
  • You've updated the readme (if adding/changing user-visible functionality).

Thanks!

@bbatsov
Copy link
Member

bbatsov commented Jan 25, 2020

The change looks good, but it might be a good idea to add an unit test as well.

This prevents issues when aligning improperly indented code. Before, the region
would be aligned while retaining the improper indentation. The follow-up
indentation step would then break the alignment that was just performed.

With this commit, we switch the order by indenting first then aligning. This
retains compatibility with the test cases in #360.
@kylc
Copy link
Contributor Author

kylc commented Jan 26, 2020

I've updated the commit to include a unit test for the case described in the bug report.

Thanks for taking the time to review!

@bbatsov bbatsov merged commit 2d5456d into clojure-emacs:master Mar 21, 2020
@bbatsov
Copy link
Member

bbatsov commented Mar 21, 2020

Sorry for the slow turnaround here. Didn't have much time for clojure-mode recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants