Skip to content

Use indent-according-to-mode in cider-maybe-insert-multiline-comment#3925

Merged
bbatsov merged 1 commit into
masterfrom
drop-clojure-indent-line
May 20, 2026
Merged

Use indent-according-to-mode in cider-maybe-insert-multiline-comment#3925
bbatsov merged 1 commit into
masterfrom
drop-clojure-indent-line

Conversation

@bbatsov
Copy link
Copy Markdown
Member

@bbatsov bbatsov commented May 20, 2026

clojure-indent-line was the only direct indent-function call in cider tied to a specific major mode. Replacing it with indent-according-to-mode dispatches via the active mode's indent-line-function, so the call works identically in clojure-mode (where it lands on clojure-indent-line) and in clojure-ts-mode (where it's the tree-sitter-driven clojure-ts-indent-line), without cider having to know which mode is active.

One-line change. Continues the small decoupling sweep from PRs #3922 and #3924.

`clojure-indent-line' was the only direct indent-function call in cider
tied to a specific major mode.  Replacing it with `indent-according-to-mode'
dispatches via the active mode's `indent-line-function', so the call works
identically in `clojure-mode' (the function happens to be
`clojure-indent-line') and in `clojure-ts-mode' (where it's the
tree-sitter-driven `clojure-ts-indent-line'), without cider having to know
which mode is active.
@bbatsov bbatsov merged commit 9c9d401 into master May 20, 2026
13 of 19 checks passed
@bbatsov bbatsov deleted the drop-clojure-indent-line branch May 20, 2026 11:23
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.

1 participant