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: Yuan Fu
Subject: Re: toml-ts-mode: first draft
Date: Sun, 11 Dec 2022 15:01:32 -0800


> On Dec 11, 2022, at 11:56 AM, Jostein Kjønigsen 
> <jostein@secure.kjonigsen.net> wrote:
> 
> On 11.12.2022 18:40, Eli Zaretskii wrote:
>>> From: Juri Linkov <juri@linkov.net>
>>> Cc: "Ergus via Emacs development discussions." <emacs-devel@gnu.org>,  Yuan
>>>  Fu <casouri@gmail.com>,  Theodor Thornhill <theo@thornhill.no>,  Eli
>>>  Zaretskii <eliz@gnu.org>
>>> Date: Sun, 11 Dec 2022 19:09:46 +0200
>>> 
>>>>  lisp/progmodes/toml-ts-mode.el
>>> Why not lisp/textmodes/toml-ts-mode.el?
>> I agree: conf-mode is in textmodes, so this new mode should be there
>> as well.
> 
> That's an easy change.
> 
> Attached is a new patch which moves the code-file to lisp/textmodes/ and also 
> makes it derive from text-mode instead.
> 
> Are there any other changes I need to implement?

Looks great!

+  (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 ;-)

Yuan





reply via email to

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