Skip to content

Inline treesit-query-p to ensure compatibility with Emacs 30 #102

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 29, 2025

Conversation

rrudakov
Copy link
Contributor

Follow up #99 (comment)

@@ -2479,7 +2479,9 @@ This function checks if `clojure-ts-mode' is compatible with the
currently installed grammar. The simplest way to do this is to validate
a query that is valid in a previous grammar version but invalid in the
required version."
(treesit-query-valid-p 'clojure '((sym_lit (meta_lit)))))
(ignore-errors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look like inlining to me. :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you prefer to define a separate function?

I just replaced the treesit-query-valid-p call with it's implementation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't realize at first that the implementation was so simple. Still, I prefer a separate function so it'd be more likely we remember to replace it with treesit-query-valid-p when the time comes.

@rrudakov rrudakov force-pushed the fix/missing-treesit-function branch from 74de948 to b9b03d4 Compare May 29, 2025 09:54
@rrudakov rrudakov requested a review from bbatsov May 29, 2025 09:54
@bbatsov bbatsov merged commit 5df8343 into clojure-emacs:main May 29, 2025
3 checks passed
@rrudakov rrudakov deleted the fix/missing-treesit-function branch May 29, 2025 10:54
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