; Better warning message when loading tree-sitter fails
* lisp/treesit.el (treesit-ready-p): Improve diagnostics on MS-Windows when the tree-sitter library cannot be loaded at run time.
This commit is contained in:
parent
95a724abaa
commit
33485fe8f7
1 changed files with 4 additions and 1 deletions
|
@ -2300,7 +2300,10 @@ instead of emitting a warning."
|
|||
;; Check for each condition and set MSG.
|
||||
(catch 'term
|
||||
(when (not (treesit-available-p))
|
||||
(setq msg "tree-sitter library is not compiled with Emacs")
|
||||
(setq msg (if (fboundp 'treesit-node-p)
|
||||
;; Windows loads tree-sitter dynakically.
|
||||
"tree-sitter library is not available or failed to load"
|
||||
"Emacs is not compiled with tree-sitter library"))
|
||||
(throw 'term nil))
|
||||
(when (> (position-bytes (max (point-min) (1- (point-max))))
|
||||
treesit-max-buffer-size)
|
||||
|
|
Loading…
Add table
Reference in a new issue