bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60511: 29.0.50; treesit-ready-p should not emit warning by default


From: Juri Linkov
Subject: bug#60511: 29.0.50; treesit-ready-p should not emit warning by default
Date: Wed, 04 Jan 2023 09:47:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>>> This currently emits a warning if the ruby grammar is not installed:
>>>
>>>     (treesit-ready-p 'ruby)
>>>
>>> I think it should *not* emit a warning, as no other predicates in Emacs
>>> do (e.g. `featurep', `integerp', etc.).
>>>
>>> It could have an optional flag to emit a warning, if there's a strong
>>> need for that.  But personally, I'd rather see a new function for that.
>>>
>>> I also don't see much need for the `message' symbol as the second
>>> argument, so I'd simplify the API by dropping that part.  It's currently
>>> unused in our tree.
>>
>> Like the argument NOERROR of `require', the argument QUIET of 
>> `treesit-ready-p'
>> could do the same.
>
> Maybe rename it to treesit-check-readiness?

I think treesit-ready-p already is a good name.
We just need to support more values in its argument QUIET,
with a new value that does nothing in case of an error,
and just returns nil.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]