]> git.eshelyaron.com Git - emacs.git/commit
Add a synchronous way to get parser change ranges (bug#78402)
authorYuan Fu <casouri@gmail.com>
Wed, 9 Jul 2025 06:14:20 +0000 (23:14 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 07:52:14 +0000 (09:52 +0200)
commit843426065091c0ee03d066ceb8432ab13ca1fa3e
treedc94373525a234a1d99a1d7a9ee6e4feefbec02d
parent1ff90b47858c1d5f507b84e81de33ef0ca71fba8
Add a synchronous way to get parser change ranges (bug#78402)

This commit only adds the new function, the fix for the bug is
in the next commit.

* doc/lispref/parsing.texi (Using Parser): Add docs.
* lisp/treesit.el (treesit): Add shortdoc.
* src/treesit.c (treesit_get_affected_ranges): New function
extracted from treesit_call_after_change_functions.
(treesit_call_after_change_functions): Extract out.
(treesit_ensure_parsed): Return affected regions.
(Ftreesit_parser_changed_regions): New function that returns the
affected regions.

(cherry picked from commit 564b947745b2a685edcd93eb8f0d8825352030b8)
doc/lispref/parsing.texi
lisp/treesit.el