]> git.eshelyaron.com Git - emacs.git/commit
Add treesit-query-first-valid
authorYuan Fu <casouri@gmail.com>
Wed, 15 Jan 2025 07:32:48 +0000 (23:32 -0800)
committerEshel Yaron <me@eshelyaron.com>
Sat, 18 Jan 2025 22:01:38 +0000 (23:01 +0100)
commitd742484e4d7351c57479e9437ffbacd05b1934a1
tree562087f33a8a232b3db15b4d0cd19d40665fdb7e
parent9fb04ce7e9e7b0d89fd19523160c5acf917bb882
Add treesit-query-first-valid

This should help major modes to support grammar versions.

* doc/lispref/parsing.texi (Pattern Matching): Mention new function.
* lisp/treesit.el (treesit-query-first-valid): New function.
(treesit-query-valid-p): New function.

(cherry picked from commit 814b45775ffcfa91c03fb54b78611eb97973c387)
doc/lispref/parsing.texi
lisp/treesit.el