]> git.eshelyaron.com Git - emacs.git/commit
Make treesit-node-at more readable
authorYuan Fu <casouri@gmail.com>
Wed, 5 Feb 2025 07:35:37 +0000 (23:35 -0800)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Feb 2025 08:40:52 +0000 (09:40 +0100)
commit20c02eb18b90dc2f6f3f81700b7a39f296cbc7c6
tree9849f8e3357c7ed006200433dd35b5eb0ac78e70
parent544b9e3dd6b36abba7942252451d403482852933
Make treesit-node-at more readable

* lisp/treesit.el (treesit-node-at): Make the logic for finding
the parser (and the root node) more explicit and
straightforward.  Don't use treesit-buffer-root-node; instead,
find the parser and use treesit-parser-root-node directly.

(cherry picked from commit 12a3145b3b9480e5e5993dac28df52a36cc7b95d)
lisp/treesit.el