Skip to content

Introduce more cycling refactoring commands #95

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

Merged
merged 1 commit into from
May 15, 2025

Conversation

rrudakov
Copy link
Contributor

These are the last cycling refactoring commands.

Added:

  • clojure-ts-cycle-conditional

  • clojure-ts-cycle-not

clojure-mode has 2 separate commands: clojure-mode-cycle-if and clojure-mode-cycle-when. For clojure-ts-mode both functions looked almost identical, so I decided to combine them into a single command. Not sure if it's a good idea, I can split it if necessary. I choose the keybinding C-c C-r C-c for clojure-ts-cycle-conditional, we can change it as well.

Slightly adapted tests from clojure-mode pass successfully.


Before submitting a PR mark the checkboxes for the items you've done (if you
think a checkbox does not apply, then leave it unchecked):

  • 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!

Added:

- clojure-ts-cycle-conditional

- clojure-ts-cycle-not
@bbatsov
Copy link
Member

bbatsov commented May 14, 2025

Not sure if it's a good idea, I can split it if necessary.

Seems like a good idea to me.

@rrudakov rrudakov requested a review from bbatsov May 14, 2025 07:48
@bbatsov bbatsov merged commit cca0e9f into clojure-emacs:main May 15, 2025
3 checks passed
@rrudakov rrudakov deleted the feature/finish-cycling branch May 15, 2025 07:33
@rrudakov
Copy link
Contributor Author

I forgot to add a reference to this PR to the changelog.

@bbatsov
Copy link
Member

bbatsov commented May 15, 2025

I'll fix this myself.

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