]> git.eshelyaron.com Git - emacs.git/commit
Revise tree-sitter facility for multi-language buffers
authorYuan Fu <casouri@gmail.com>
Fri, 4 Nov 2022 08:31:56 +0000 (01:31 -0700)
committerYuan Fu <casouri@gmail.com>
Fri, 4 Nov 2022 16:39:57 +0000 (09:39 -0700)
commitd9d66764e2a02db9f19f5c76ce34ac7d8bc1edc6
tree8ea201a94b7e0e3b80dba409693d87ee56aea871
parentf6dc55f516a88765bbd8b8c34f0ec663b8948373
Revise tree-sitter facility for multi-language buffers

* doc/lispref/parsing.texi (Multiple Languages): Extend and update
manual.
* lisp/treesit.el (treesit-range-functions): Remove variable.
(treesit-range-settings): New variable.
(treesit-range-rules): New function.
(treesit--merge-ranges): New function.
(treesit-update-ranges): Use treesit-range-settings instead of
treesit-range-functions.
(treesit-font-lock-rules): Fix docstring.
(treesit-indent)
(treesit-indent-region): Only update ranges in a region.
* test/src/treesit-tests.el (treesit-range): New test.
doc/lispref/parsing.texi
lisp/treesit.el
test/src/treesit-tests.el