]> git.eshelyaron.com Git - emacs.git/commit
Add the keyword ':copy-queries' to 'treesit-language-source-alist'.
authorJuri Linkov <juri@linkov.net>
Wed, 23 Apr 2025 17:17:46 +0000 (20:17 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Apr 2025 19:34:06 +0000 (21:34 +0200)
commiteda47f2c4b73e9b93e58ae56ce74995d95f1ce35
treeaa5680f654b0ef6c2b24386835ce5a08526d7506
parent2ae83b1773d439aaecd3f2a1c5a6b42edff26ed3
Add the keyword ':copy-queries' to 'treesit-language-source-alist'.

* lisp/treesit-x.el (define-treesit-generic-mode): Add keyword
':copy-queries t' to the end of 'source'.

* lisp/treesit.el (treesit-language-source-alist):
Document the keyword ':copy-queries'.
(treesit--install-language-grammar-1): Add &rest args.
Process the keyword args.  Call 'treesit--copy-queries'
when :copy-queries is non-nil.
(treesit--copy-queries): Add arg 'source-dir'.  Copy queries
from source-dir as well.  Copy only the file "highlights.scm".

(cherry picked from commit 261a965ff1a423c9dc0ee7c89974e4fc3c16b863)
lisp/treesit-x.el
lisp/treesit.el