]> git.eshelyaron.com Git - emacs.git/commit
Add 'restricted' tactic in tree-sitter navigation functions
authorYuan Fu <casouri@gmail.com>
Thu, 6 Apr 2023 21:38:00 +0000 (14:38 -0700)
committerYuan Fu <casouri@gmail.com>
Wed, 12 Apr 2023 07:02:20 +0000 (00:02 -0700)
commit2ce27563ecc8d2427a24973d90ac4744aa3ae15f
tree233c48e3eb6f4991495395933586bec3694e7529
parente54feef094a273cea28c980df57de0808cc7ef30
Add 'restricted' tactic in tree-sitter navigation functions

* lisp/treesit.el (treesit-forward-sexp): Add docstring.  Use
'restricted' tactic.
(treesit-transpose-sexps): Fix docstring.
(treesit-beginning-of-thing)
(treesit-end-of-thing): Add support for TACTIC.
(treesit-beginning-of-defun)
(treesit-end-of-defun): Supply treesit-defun-tactic as TACTIC.
(treesit--navigate-thing): Add support for TACTIC.  Wrap the old form
in a new (if (eq tactic 'restricted) (new-code) (old-form)), and
supply the TACTIC parameter when recursing.
lisp/treesit.el