]> git.eshelyaron.com Git - emacs.git/commit
Don't process function range settings in treesit--update-range-1
authorYuan Fu <casouri@gmail.com>
Mon, 3 Mar 2025 04:26:28 +0000 (20:26 -0800)
committerEshel Yaron <me@eshelyaron.com>
Tue, 4 Mar 2025 21:03:31 +0000 (22:03 +0100)
commit735cf4295fe27e0136c7f0cea096f954ed9d083f
tree62a8a37800f3d354c0c07934b10aa26b1b700505
parente87144dcd13cd675d433436b47b6c2af523f660c
Don't process function range settings in treesit--update-range-1

This fixes a bug where we call treesit-query-language on a
function, which happens before the QUERY in a range setting can
be either a function or a query, but we call it with
treesit-query-language before knowing whether it's a query or
function.

* lisp/treesit.el:
(treesit--update-range-1): Skip function range settings.
(treesit-update-ranges): Handle function range settings here.

(cherry picked from commit a211a940a1e085d53172ceddf6bfc2391985e861)
lisp/treesit.el