]> git.eshelyaron.com Git - emacs.git/commit
Use the first parser from 'treesit-parser-list' to fix tests.
authorJuri Linkov <juri@linkov.net>
Thu, 17 Apr 2025 06:49:04 +0000 (09:49 +0300)
committerEshel Yaron <me@eshelyaron.com>
Thu, 17 Apr 2025 07:20:21 +0000 (09:20 +0200)
commit117bf29f73ae3b71712b08b3aceeb4d8d0cfb076
tree4e86ebd6f70e74d44dc596dc5edc3b64d427048d
parentcfe2d5a73c92aa23d2dfc9d33f99ad52d3402272
Use the first parser from 'treesit-parser-list' to fix tests.

* lisp/treesit.el (treesit-parsers-at): Add treesit-primary-parser
only when it's non-nil.  When the result list is still empty,
add the first parser from 'treesit-parser-list'.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00627.html

* test/src/treesit-tests.el (treesit-node-supplemental)
(treesit-node-at, treesit-node-check)
(treesit-search-subtree-forward-1)
(treesit-search-subtree-backward-1): Wrap test body in 'with-temp-buffer'.

(cherry picked from commit ee46b6c4e67aa52b4ef683c5c16f64638e369cd3)
lisp/treesit.el
test/src/treesit-tests.el