]> git.eshelyaron.com Git - emacs.git/commit
Make sure undefined tree-sitter thing doesn't raise an error
authorYuan Fu <casouri@gmail.com>
Tue, 12 Sep 2023 03:59:50 +0000 (20:59 -0700)
committerYuan Fu <casouri@gmail.com>
Tue, 12 Sep 2023 20:16:41 +0000 (13:16 -0700)
commitb392d05089014ac6d41e35a016d46f496964f879
treeb8d33e942360b287c768eae7b6a1274862f8fa70
parentfad91b56d13e7bc902cce522671ebf47b0632d45
Make sure undefined tree-sitter thing doesn't raise an error

A previous change should've achived this, but that wasn't enough.
This one actually achieves the intended effect, namely,
treesit-node-match-p doesn't raise an error if IGNORE-MISSING is
non-nil, and traverse functions don't raise error by default.

* src/treesit.c (treesit_traverse_validate_predicate): Remove
ignore_missing parameter, return error symbol.
(Ftreesit_node_match_p)
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Check returned error symbol.
(syms_of_treesit): New symbol.
src/treesit.c