[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 09b5f00613: ; Fix calls to treesit functions
From: |
Stefan Monnier |
Subject: |
Re: master 09b5f00613: ; Fix calls to treesit functions |
Date: |
Sun, 18 Dec 2022 15:19:53 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> +(declare-function treesit-available-p "treesit.c")
> (declare-function treesit-parser-list "treesit.c")
> (declare-function treesit-node-type "treesit.c")
>
> @@ -156,7 +157,8 @@ or follows point."
> (interactive "P")
> (save-excursion
> (let ((treesit-text-node
> - (and (treesit-parser-list)
> + (and (treesit-available-p)
> + (treesit-parser-list)
How 'bout always defining `treesit-parser-list` (and making it return
`nil` if Emacs was compiled without Tree-sitter support)?
Most places that can make use of Tree-sitter probably would probably
prefer not to have to worry about the subtle distinction between
"Tree-sitter support is available but not for this major mode" and
"Tree-sitter support is not available at all".
Stefan
- Re: master 09b5f00613: ; Fix calls to treesit functions,
Stefan Monnier <=