From: Yuan Fu Date: Sun, 8 Dec 2024 06:13:07 +0000 (-0800) Subject: Declare tree-sitter functions with a new macro X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d5f307b2ecb20e1baef734862a835f7607ba96e8;p=emacs.git Declare tree-sitter functions with a new macro * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/elixir-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/heex-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/lua-ts-mode.el: * lisp/progmodes/php-ts-mode.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/rust-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/python.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/c-ts-common.el: * lisp/progmodes/prog-mode.el: * lisp/progmodes/typescript-ts-mode.el: Use new macro. * lisp/treesit.el (treesit-declare-unavailable-functions): New macro. (cherry picked from commit 9377ef5c2369202e372774c873af4d6c259cd28f) --- diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el index 07789f7203d..363a0b42292 100644 --- a/lisp/progmodes/c-ts-common.el +++ b/lisp/progmodes/c-ts-common.el @@ -46,18 +46,7 @@ (require 'treesit) (eval-when-compile (require 'rx)) - -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-parent "treesit.c") -(declare-function treesit-node-prev-sibling "treesit.c") -(declare-function treesit-parser-language "treesit.c") -(declare-function treesit-node-match-p "treesit.c") -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-eq "treesit.c") -(declare-function treesit-parser-root-node "treesit.c") -(declare-function treesit-node-parser "treesit.c") +(treesit-declare-unavailable-functions) ;;; Comment indentation and filling diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 78cd6f367fb..5e3194dd82e 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -72,23 +72,7 @@ (require 'treesit) (require 'c-ts-common) (eval-when-compile (require 'rx)) - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-parser-root-node "treesit.c") -(declare-function treesit-parser-set-included-ranges "treesit.c") -(declare-function treesit-node-parent "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-prev-sibling "treesit.c") -(declare-function treesit-node-first-child-for-pos "treesit.c") -(declare-function treesit-node-next-sibling "treesit.c") -(declare-function treesit-node-eq "treesit.c") -(declare-function treesit-node-match-p "treesit.c") -(declare-function treesit-query-compile "treesit.c") -(declare-function treesit-node-check "treesit.c") +(treesit-declare-unavailable-functions) ;;; Custom variables diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el index 597ef69d9b8..3ec239e89bb 100644 --- a/lisp/progmodes/cmake-ts-mode.el +++ b/lisp/progmodes/cmake-ts-mode.el @@ -29,11 +29,7 @@ (require 'treesit) (eval-when-compile (require 'rx)) - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-query-capture "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-search-subtree "treesit.c") +(treesit-declare-unavailable-functions) (defcustom cmake-ts-mode-indent-offset 2 "Number of spaces for each indentation step in `cmake-ts-mode'." diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index b86555b1d87..0438a25242b 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -35,19 +35,12 @@ (require 'cc-langs) (require 'treesit) (require 'c-ts-common) ; For comment indenting and filling. +(treesit-declare-unavailable-functions) (eval-when-compile (require 'cc-fonts) (require 'rx)) -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-induce-sparse-tree "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-query-capture "treesit.c") -(declare-function treesit-query-compile "treesit.c") - (defgroup csharp nil "Major mode for editing C# code." :group 'prog-mode) diff --git a/lisp/progmodes/dockerfile-ts-mode.el b/lisp/progmodes/dockerfile-ts-mode.el index 42fa7482a87..a234af65a3d 100644 --- a/lisp/progmodes/dockerfile-ts-mode.el +++ b/lisp/progmodes/dockerfile-ts-mode.el @@ -29,11 +29,7 @@ (require 'treesit) (eval-when-compile (require 'rx)) - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-node-type "treesit.c") +(treesit-declare-unavailable-functions) (defvar dockerfile-ts-mode--syntax-table (let ((table (make-syntax-table))) diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index cacdb266298..23ad04a662d 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -45,22 +45,7 @@ (require 'treesit) (eval-when-compile (require 'rx)) - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-parser-language "treesit.c") -(declare-function treesit-parser-included-ranges "treesit.c") -(declare-function treesit-parser-list "treesit.c") -(declare-function treesit-node-p "treesit.c") -(declare-function treesit-node-parent "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-query-compile "treesit.c") -(declare-function treesit-query-capture "treesit.c") -(declare-function treesit-node-eq "treesit.c") -(declare-function treesit-node-prev-sibling "treesit.c") +(treesit-declare-unavailable-functions) (defgroup elixir-ts nil "Major mode for editing Elixir code." diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 6fa8049e5e7..91831b04530 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -29,15 +29,7 @@ (require 'treesit) (eval-when-compile (require 'rx)) - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-induce-sparse-tree "treesit.c") -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-search-subtree "treesit.c") +(treesit-declare-unavailable-functions) (defcustom go-ts-mode-indent-offset 8 "Number of spaces for each indentation step in `go-ts-mode'." diff --git a/lisp/progmodes/heex-ts-mode.el b/lisp/progmodes/heex-ts-mode.el index 84fd513525c..7430e4f3adb 100644 --- a/lisp/progmodes/heex-ts-mode.el +++ b/lisp/progmodes/heex-ts-mode.el @@ -33,11 +33,7 @@ (require 'treesit) (eval-when-compile (require 'rx)) - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-start "treesit.c") +(treesit-declare-unavailable-functions) (defgroup heex-ts nil "Major mode for editing HEEx code." diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index 177f914160c..459e57ebfb4 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -32,14 +32,7 @@ (require 'treesit) (eval-when-compile (require 'rx)) (require 'c-ts-common) ; For comment indent and filling. - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-induce-sparse-tree "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-query-capture "treesit.c") +(treesit-declare-unavailable-functions) (defcustom java-ts-mode-indent-offset 4 "Number of spaces for each indentation step in `java-ts-mode'." diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index d6474a660f0..afc43fb966a 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -55,24 +55,12 @@ (require 'prog-mode) (require 'treesit) (require 'c-ts-common) ; For comment indent and filling. +(treesit-declare-unavailable-functions) (eval-when-compile (require 'cl-lib) (require 'rx)) -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-induce-sparse-tree "treesit.c") -(declare-function treesit-search-subtree "treesit.c") -(declare-function treesit-node-parent "treesit.c") -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-node-next-sibling "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-query-compile "treesit.c") -(declare-function treesit-query-capture "treesit.c") - ;;; Constants (defconst js--name-start-re "[[:alpha:]_$]" diff --git a/lisp/progmodes/json-ts-mode.el b/lisp/progmodes/json-ts-mode.el index 7409c6be833..70b18ce7d95 100644 --- a/lisp/progmodes/json-ts-mode.el +++ b/lisp/progmodes/json-ts-mode.el @@ -29,13 +29,7 @@ (require 'treesit) (require 'rx) - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-induce-sparse-tree "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") - +(treesit-declare-unavailable-functions) (defcustom json-ts-mode-indent-offset 2 "Number of spaces for each indentation step in `json-ts-mode'." diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index f7669a1b015..24be7f1a09c 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -33,23 +33,11 @@ (require 'comint) (require 'treesit) +(treesit-declare-unavailable-functions) (eval-when-compile (require 'rx)) -(declare-function treesit-induce-sparse-tree "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-node-child-count "treesit.c") -(declare-function treesit-node-eq "treesit.c") -(declare-function treesit-node-first-child-for-pos "treesit.c") -(declare-function treesit-node-parent "treesit.c") -(declare-function treesit-node-prev-sibling "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-search-subtree "treesit.c") - (defgroup lua-ts nil "Major mode for editing Lua files." :prefix "lua-ts-" diff --git a/lisp/progmodes/php-ts-mode.el b/lisp/progmodes/php-ts-mode.el index 055e961f912..5a901064010 100644 --- a/lisp/progmodes/php-ts-mode.el +++ b/lisp/progmodes/php-ts-mode.el @@ -58,30 +58,13 @@ (require 'css-mode) ;; for embed css into html (require 'js) ;; for embed javascript into html (require 'comint) +(treesit-declare-unavailable-functions) (eval-when-compile (require 'cl-lib) (require 'rx) (require 'subr-x)) -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-node-parent "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-string "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-parser-add-notifier "treesit.c") -(declare-function treesit-parser-buffer "treesit.c") -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-parser-included-ranges "treesit.c") -(declare-function treesit-parser-list "treesit.c") -(declare-function treesit-parser-language "treesit.c") -(declare-function treesit-query-compile "treesit.c") -(declare-function treesit-search-forward "treesit.c") -(declare-function treesit-node-prev-sibling "treesit.c") -(declare-function treesit-node-first-child-for-pos "treesit.c") - ;;; Install treesitter language parsers (defvar php-ts-mode--language-source-alist '((php . ("https://github.com/tree-sitter/tree-sitter-php" "v0.23.11" "php/src")) diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index b13318c59ae..6d53c3994ae 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -33,11 +33,7 @@ (require 'subr-x) (require 'treesit)) -(declare-function treesit-available-p "treesit.c") -(declare-function treesit-parser-list "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-at "treesit.c") -(declare-function treesit-node-match-p "treesit.c") +(treesit-declare-unavailable-functions) (defgroup prog-mode nil "Generic programming mode, from which others derive." diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index bd263401dde..95bd1e49cd0 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -255,20 +255,12 @@ (require 'compat) (require 'project nil 'noerror) (require 'seq) +(treesit-declare-unavailable-functions) ;; Avoid compiler warnings (defvar compilation-error-regexp-alist) (defvar outline-heading-end-regexp) -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-induce-sparse-tree "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-node-parent "treesit.c") -(declare-function treesit-node-prev-sibling "treesit.c") - (autoload 'comint-mode "comint") (autoload 'help-function-arglist "help-fns") diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el index 2b36c68bb6c..7d108ed9841 100644 --- a/lisp/progmodes/ruby-ts-mode.el +++ b/lisp/progmodes/ruby-ts-mode.el @@ -112,23 +112,7 @@ (require 'treesit) (require 'ruby-mode) - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-induce-sparse-tree "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-search-subtree "treesit.c") -(declare-function treesit-node-parent "treesit.c") -(declare-function treesit-node-next-sibling "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-string "treesit.c") -(declare-function treesit-query-compile "treesit.c") -(declare-function treesit-query-capture "treesit.c") -(declare-function treesit-parser-add-notifier "treesit.c") -(declare-function treesit-parser-buffer "treesit.c") -(declare-function treesit-parser-list "treesit.c") +(treesit-declare-unavailable-functions) (defgroup ruby-ts nil "Major mode for editing Ruby code." diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index 7a421eb506b..ee749e963cd 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el @@ -30,16 +30,7 @@ (require 'treesit) (eval-when-compile (require 'rx)) (require 'c-ts-common) ; For comment indent and filling. - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-induce-sparse-tree "treesit.c") -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-parent "treesit.c") -(declare-function treesit-query-compile "treesit.c") +(treesit-declare-unavailable-functions) (defcustom rust-ts-mode-indent-offset 4 "Number of spaces for each indentation step in `rust-ts-mode'." diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 505a45de080..b145525915f 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -149,8 +149,7 @@ (require 'subr-x)) (require 'executable) (require 'treesit) - -(declare-function treesit-parser-create "treesit.c") +(treesit-declare-unavailable-functions) (autoload 'comint-completion-at-point "comint") (autoload 'comint-filename-completion "comint") diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 9d2af5d9fea..5e5012ade59 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -31,13 +31,7 @@ (require 'js) (eval-when-compile (require 'rx)) (require 'c-ts-common) ; For comment indent and filling. - -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-query-capture "treesit.c") -(declare-function treesit-query-compile "treesit.c") +(treesit-declare-unavailable-functions) (defcustom typescript-ts-mode-indent-offset 2 "Number of spaces for each indentation step in `typescript-ts-mode'." diff --git a/lisp/treesit.el b/lisp/treesit.el index 10e0e9f885d..6cb37631919 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -39,61 +39,69 @@ ;;; Function declarations -(declare-function treesit-language-available-p "treesit.c") -(declare-function treesit-language-version "treesit.c") - -(declare-function treesit-parser-p "treesit.c") -(declare-function treesit-node-p "treesit.c") -(declare-function treesit-compiled-query-p "treesit.c") -(declare-function treesit-query-p "treesit.c") -(declare-function treesit-query-language "treesit.c") - -(declare-function treesit-node-parser "treesit.c") - -(declare-function treesit-parser-create "treesit.c") -(declare-function treesit-parser-delete "treesit.c") -(declare-function treesit-parser-list "treesit.c") -(declare-function treesit-parser-buffer "treesit.c") -(declare-function treesit-parser-language "treesit.c") -(declare-function treesit-parser-tag "treesit.c") - -(declare-function treesit-parser-root-node "treesit.c") - -(declare-function treesit-parser-set-included-ranges "treesit.c") -(declare-function treesit-parser-included-ranges "treesit.c") -(declare-function treesit-parser-changed-ranges "treesit.c") -(declare-function treesit-parser-add-notifier "treesit.c") - -(declare-function treesit-node-type "treesit.c") -(declare-function treesit-node-start "treesit.c") -(declare-function treesit-node-end "treesit.c") -(declare-function treesit-node-string "treesit.c") -(declare-function treesit-node-parent "treesit.c") -(declare-function treesit-node-child "treesit.c") -(declare-function treesit-node-check "treesit.c") -(declare-function treesit-node-field-name-for-child "treesit.c") -(declare-function treesit-node-child-count "treesit.c") -(declare-function treesit-node-child-by-field-name "treesit.c") -(declare-function treesit-node-next-sibling "treesit.c") -(declare-function treesit-node-prev-sibling "treesit.c") -(declare-function treesit-node-first-child-for-pos "treesit.c") -(declare-function treesit-node-descendant-for-range "treesit.c") -(declare-function treesit-node-eq "treesit.c") - -(declare-function treesit-pattern-expand "treesit.c") -(declare-function treesit-query-expand "treesit.c") -(declare-function treesit-query-compile "treesit.c") -(declare-function treesit-query-capture "treesit.c") - -(declare-function treesit-search-subtree "treesit.c") -(declare-function treesit-search-forward "treesit.c") -(declare-function treesit-induce-sparse-tree "treesit.c") -(declare-function treesit-subtree-stat "treesit.c") -(declare-function treesit-node-match-p "treesit.c") - -(declare-function treesit-available-p "treesit.c") - -(defvar treesit-thing-settings) +(defmacro treesit-declare-unavailable-functions () + "Declare C functions and variables defined in treesit.c. + +This macro is only needed when a file needs to be able to byte-compile +in a Emacs not built with tree-sitter library." + '(progn + (declare-function treesit-language-available-p "treesit.c") + (declare-function treesit-language-version "treesit.c") + + (declare-function treesit-parser-p "treesit.c") + (declare-function treesit-node-p "treesit.c") + (declare-function treesit-compiled-query-p "treesit.c") + (declare-function treesit-query-p "treesit.c") + (declare-function treesit-query-language "treesit.c") + + (declare-function treesit-node-parser "treesit.c") + + (declare-function treesit-parser-create "treesit.c") + (declare-function treesit-parser-delete "treesit.c") + (declare-function treesit-parser-list "treesit.c") + (declare-function treesit-parser-buffer "treesit.c") + (declare-function treesit-parser-language "treesit.c") + (declare-function treesit-parser-tag "treesit.c") + + (declare-function treesit-parser-root-node "treesit.c") + + (declare-function treesit-parser-set-included-ranges "treesit.c") + (declare-function treesit-parser-included-ranges "treesit.c") + (declare-function treesit-parser-changed-ranges "treesit.c") + (declare-function treesit-parser-add-notifier "treesit.c") + + (declare-function treesit-node-type "treesit.c") + (declare-function treesit-node-start "treesit.c") + (declare-function treesit-node-end "treesit.c") + (declare-function treesit-node-string "treesit.c") + (declare-function treesit-node-parent "treesit.c") + (declare-function treesit-node-child "treesit.c") + (declare-function treesit-node-check "treesit.c") + (declare-function treesit-node-field-name-for-child "treesit.c") + (declare-function treesit-node-child-count "treesit.c") + (declare-function treesit-node-child-by-field-name "treesit.c") + (declare-function treesit-node-next-sibling "treesit.c") + (declare-function treesit-node-prev-sibling "treesit.c") + (declare-function treesit-node-first-child-for-pos "treesit.c") + (declare-function treesit-node-descendant-for-range "treesit.c") + (declare-function treesit-node-eq "treesit.c") + + (declare-function treesit-pattern-expand "treesit.c") + (declare-function treesit-query-expand "treesit.c") + (declare-function treesit-query-compile "treesit.c") + (declare-function treesit-query-capture "treesit.c") + + (declare-function treesit-search-subtree "treesit.c") + (declare-function treesit-search-forward "treesit.c") + (declare-function treesit-induce-sparse-tree "treesit.c") + (declare-function treesit-subtree-stat "treesit.c") + (declare-function treesit-node-match-p "treesit.c") + + (declare-function treesit-available-p "treesit.c") + + (defvar treesit-thing-settings))) + +(treesit-declare-unavailable-functions) ;;; Custom options