mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-16 15:56:52 -05:00
fix: backport treesit-available-p sooner
This fixes Doom for Emacs 27-28 users (or builds without treesit).
This commit is contained in:
@@ -132,6 +132,25 @@ The functions in the hook are called with one parameter -- the
|
||||
(funcall fn theme)
|
||||
(run-hook-with-args 'enable-theme-functions theme))))
|
||||
|
||||
;; Introduced in 29.1
|
||||
;; In case of Emacs builds where treesit isn't built in (to avoid void-function
|
||||
;; errors and verbose, redundant checks everywhere).
|
||||
;;;###autodef
|
||||
(unless (fboundp 'treesit-available-p)
|
||||
(defun treesit-available-p ()
|
||||
"Return non-nil if tree-sitter support is built-in and available."
|
||||
nil))
|
||||
|
||||
;;;###autoload
|
||||
(unless (fboundp 'treesit-library-abi-version)
|
||||
(defun treesit-library-abi-version (&optional _min-compatible)
|
||||
0))
|
||||
|
||||
;;;###autoload
|
||||
(unless (fboundp 'treesit-language-abi-version)
|
||||
(defun treesit-language-abi-version (&optional _lang)
|
||||
nil))
|
||||
|
||||
|
||||
;;; From Emacs >= 30
|
||||
;; Introduced in 30.1
|
||||
|
Reference in New Issue
Block a user