Fix "wrong-type-argument integerp" error in clojure-align
#673
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background:
clojure-ts-mode
doesn't (yet) have an equivalent toclojure-align
for vertically aligning contents of sexps. See clojure-emacs/clojure-ts-mode#16To aid this for the time being, users of
clojure-ts-mode
major mode could useclojure-mode
'sclojure-align
.However, this currently fails with this error (tested on
Emacs 29.2
):It seems
treesit-indent-region
is picky to actually get the positions as integers, whereas other implementations also accept markers.This change ensures that
indent-region
is called with the positions as integers, allowingclojure-align
also being successfully called fromclojure-ts-mode
buffers.Tests: As there is no test harness yet for
clojure-ts-mode
, I think there is only to ensureclojure-align
still works as expected fromclojure-mode
major mode, which is covered here.