Function: treesit-end-of-thing

treesit-end-of-thing is a byte-compiled function defined in treesit.el.gz.

Signature

(treesit-end-of-thing PATTERN &optional ARG)

Documentation

Like end-of-defun, but generalized into things.

PATTERN is like treesit-defun-type-regexp, ARG is the same as in end-of-defun.

Return non-nil if successfully moved, nil otherwise.

Source Code

;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit-end-of-thing (pattern &optional arg)
  "Like `end-of-defun', but generalized into things.

PATTERN is like `treesit-defun-type-regexp', ARG is the same as
in `end-of-defun'.

Return non-nil if successfully moved, nil otherwise."
  (pcase-let* ((arg (or arg 1))
               (`(,regexp . ,pred) (treesit--thing-unpack-pattern
                                    pattern))
               (dest (treesit--navigate-thing
                      (point) arg 'end regexp pred)))
    (when dest
      (goto-char dest))))