]> git.eshelyaron.com Git - emacs.git/commit
Make use of the new pred shapes in treesit.el
authorYuan Fu <casouri@gmail.com>
Fri, 14 Apr 2023 02:48:57 +0000 (19:48 -0700)
committerYuan Fu <casouri@gmail.com>
Fri, 14 Apr 2023 22:52:30 +0000 (15:52 -0700)
commit293029458c87d6ec18a6f6a5958d0b499310ca3b
tree0cc43727b42ab9617fafb6fa366a3e8a93c8482c
parenta4de6d8dd3b6a5ac39737812e17a2a8d766e9f3a
Make use of the new pred shapes in treesit.el

treesit-search-forward and friends now accept more shapes for PRED,
make use of it in navigation functions.

* lisp/treesit.el (treesit-node-top-level): Use treesit-node-match-p.
(treesit--thing-unpack-pattern): Remove function.
(treesit-beginning-of-thing)
(treesit-end-of-thing): Remove PRED argument.
(treesit--things-around): Remove PRED argument, use
treesit-node-match-p.
(treesit--top-level-thing): Remove function.
(treesit--navigate-thing): Remove PRED argument.
(treesit-thing-at-point): Update docstring, don't unpack PATTERN.

* test/src/treesit-tests.el:
(treesit--ert-test-defun-navigation): Don't unpack pattern.
lisp/treesit.el
test/src/treesit-tests.el