]> git.eshelyaron.com Git - emacs.git/commit
Further generalize treesit-defun functions
authorYuan Fu <casouri@gmail.com>
Sun, 25 Dec 2022 06:08:17 +0000 (22:08 -0800)
committerYuan Fu <casouri@gmail.com>
Sun, 25 Dec 2022 09:11:47 +0000 (01:11 -0800)
commit79584a206b9b36e4937c32845464bfc9b438dade
treea3b7f8cc5517318b32d7e445398f38fe83ff00dc
parenta819ca5a93c56f7647940f6e8ef05503eecf4e9e
Further generalize treesit-defun functions

Two new functions, treesit-beginning/end-of-thing.  And
treesit-thing-at-point's signature changes.

* lisp/treesit.el (treesit-block-type-regexp): New variable.
(treesit-beginning-of-thing)
(treesit-end-of-thing): Generalized from
treesit-beginning/end-of-defun.
(treesit-beginning-of-defun)
(treesit-end-of-defun): Use the new functions.
(treesit-thing-at-point): Accept PATTERN rather than REGEXP and PRED.
(treesit-defun-at-point): Adjust for the new signature of
treesit-thing-at-point.
lisp/treesit.el