emacs-devel
[Top][All Lists]
Advanced

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

Re: toml-ts-mode: first draft


From: Rudolf Schlatte
Subject: Re: toml-ts-mode: first draft
Date: Tue, 13 Dec 2022 11:45:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin)

Yuan Fu <casouri@gmail.com> writes:

>
> +  (unless (treesit-ready-p 'toml)
> +    (error "Tree-sitter for TOML isn't avilable”))
>
> Treesit-ready-p already raises a warning when something goes wrong. So
> you want to either pass the QUIET argument or let it do the barking
> ;-)

I'd expect predicates (functions ending -p) to return T or NIL only and
not have side effects.  A function with the described behavior (check
for availability and raise an error if not) could be named something
like `tree-sitter-ensure-language'.

Please ignore this mail if necessary; this small stylistic thing has
been sitting with me for days now and I needed to get it off my chest :-)

Rudi




reply via email to

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