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: Stefan Kangas
Subject: bug#60511: 29.0.50; treesit-ready-p should not emit warning by default
Date: Sun, 8 Jan 2023 10:14:07 -0800

Eli Zaretskii <eliz@gnu.org> writes:

>> I can make treesit-ready-p not emit any warning by default, and change
>> the quiet parameter to WARN, and accept either 'warn or ‘message.
>>
>> Basically:
>>
>> (treesit-ready-p lang) => t/nil
>> (treesit-ready-p lang 'warn) => t/emit warning
>> (treesit-ready-p lang 'message) => t/message

This makes sense to me.

>> Eli, WDYT?
>
> I think the default should be to emit a warning, like we do now.

In that case, it would be better to rename `treesit-ready-p' to reflect
that it's not a predicate function.  I believe Juri suggested the name
`treesit-check-readiness'.

Then there's the question if we want a predicate function for this too.
I think it would be useful.

> We should support the main use case of the user turning on a TS mode
> when the required libraries are not installed or incompatible with our
> requirements.  Silently doing nothing in that case is not TRT.

To be clear, I did not suggest changing that behavior.





reply via email to

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