diff --git a/modules/tools/tree-sitter/doctor.el b/modules/tools/tree-sitter/doctor.el index f5ebe8731..4a32abf4f 100644 --- a/modules/tools/tree-sitter/doctor.el +++ b/modules/tools/tree-sitter/doctor.el @@ -1,8 +1,10 @@ ;;; tools/tree-sitter/doctor.el -*- lexical-binding: t; -*- (unless (fboundp 'module-load) - (warn! "Emacs was not built with dynamic modules support, which the treesit.el library requires")) + (error! "Emacs not built with dynamic modules support")) -(unless (and (fboundp 'treesit-available-p) - (treesit-available-p)) - (error! "Treesit library not available. Did you build Emacs with tree-sitter support?")) +(if (version< emacs-version "29.1") + (error! "Emacs 29.1 or newer is required for tree-sitter support") + (unless (and (fboundp 'treesit-available-p) + (treesit-available-p)) + (error! "Emacs not built with tree-sitter support!")))