]> git.eshelyaron.com Git - emacs.git/commit
Make indirect buffers use tree-sitter parsers of their base buffer
authorYuan Fu <casouri@gmail.com>
Wed, 7 Dec 2022 22:50:16 +0000 (14:50 -0800)
committerYuan Fu <casouri@gmail.com>
Sat, 10 Dec 2022 01:24:08 +0000 (17:24 -0800)
commitebef8905b0df9572e80e20fdc8da7829b9270e3f
tree05f3b264babb0edf4d1a4d6985eca3f7aac1ed3d
parent8f53fa10d9453f36aa601e5943cb903adeacc7fe
Make indirect buffers use tree-sitter parsers of their base buffer

Fix the problem described in bug#59693.

* src/treesit.c (treesit_record_change): Always use the base buffer.
(Ftreesit_parser_create): Always use the base buffer.  Also change the
for loop into FOR_EACH_TAIL (stylistic change).
(Ftreesit_parser_list): Always use the base buffer.

* doc/lispref/parsing.texi (Using Parser): Update manual.
* test/src/treesit-tests.el (treesit-indirect-buffer): New test.
doc/lispref/parsing.texi
src/treesit.c
test/src/treesit-tests.el