From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: toml-ts-mode: first draft Date: Sun, 11 Dec 2022 15:01:32 -0800 Message-ID: <7825A406-3F21-4E38-9E9B-B429B9E81B4E@gmail.com> References: <4E261A68-AB14-48A5-B19C-8981CB003F33@secure.kjonigsen.net> <86a63unfvp.fsf@mail.linkov.net> <83cz8pu9cr.fsf@gnu.org> <0f74be1a-8502-ce66-6101-2b3f060295c5@secure.kjonigsen.net> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17834"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Juri Linkov , emacs-devel , theo@thornhill.no To: jostein@kjonigsen.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 12 00:02:21 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p4VKv-0004QO-Cr for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Dec 2022 00:02:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4VKJ-0002uF-GW; Sun, 11 Dec 2022 18:01:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4VKG-0002sE-UU for emacs-devel@gnu.org; Sun, 11 Dec 2022 18:01:41 -0500 Original-Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4VKF-0004mp-9Y; Sun, 11 Dec 2022 18:01:40 -0500 Original-Received: by mail-pg1-x531.google.com with SMTP id 36so102798pgp.10; Sun, 11 Dec 2022 15:01:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gP4pK2ysEbYfTPQ71fZoEfcXKCdthYrh4nFkske7ecU=; b=HYh52ZDSyWmtK4KQisWvUR7rs2IVXHLMm1XuhEEF+xQF4NxOlZUqYXFehWBI2AfNHT zZMT65HpZJbxkbumX6BzPqb8EEbTA9SNQ1zMeecVZi83CxntqGdsI+cO6lbyy0tu74RB SCPOPbzhb3wv3EIljhgIgEnPPu4Mvx0JmsVMe0Biue3OP8HxvdKgERjOmUS7+Q0wCTN8 O3+S40KMLZLjOB5iUg5Qm4lIqtUOVT/Oen4JHhaejqyNN77Rqbco3a5C/xNDcnF8t6/T MYaef2O4DvGrlXGJgITySo/EY7ArKOGxE+6KvhYOoxQSteeXJkuET5zdDtrJMNUOnoao jImQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gP4pK2ysEbYfTPQ71fZoEfcXKCdthYrh4nFkske7ecU=; b=fGZqf02WykgVnEVFPR88tNqxtGuslI21BVMTLiCoZ2XvPAxrlh33LzFLciB/DsQYxK iqRfDlp1UWu539nh8/FYCasseeGAFUmCHzibNmPpq8kYXL3bQAKwp+BgULPvREhZIoNn HAvC0Nra0LStQ6EbFHg/IRJ68vRnIMRDGdSnSrEEgPnBp2YU0CM3+xm4ZGdpXkR/sQe/ QGfIaqe2BAx6iil49O0Ig3M+QRx5mImqjI923gTE9YHQXVv4Zmw94XzX1R/KIdhMkpB0 65l4Vtcans+VSxYx7cgOGLwgx3zXBwWwo0CHRC2yGDZtgo63kE/0cvCa+EP8+OD92ndA LCuQ== X-Gm-Message-State: ANoB5pm3nFEoIDr5NZa1/NYEUVNuSmmYmxrJlBYGU8mp1WXu2T0/WpqU +FEJPQx90RRm/icOQnbxtQw= X-Google-Smtp-Source: AA0mqf4UlxA2YcHf/82sLeAkpG/e135RJaaMp61zlkWdHF5z0DBat+92R38Qi0kKlyPOlP+9j2fAsQ== X-Received: by 2002:a62:17d4:0:b0:578:119c:1c52 with SMTP id 203-20020a6217d4000000b00578119c1c52mr9572620pfx.14.1670799696488; Sun, 11 Dec 2022 15:01:36 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id w13-20020a62820d000000b005632f6490aasm4419801pfd.77.2022.12.11.15.01.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Dec 2022 15:01:36 -0800 (PST) In-Reply-To: <0f74be1a-8502-ce66-6101-2b3f060295c5@secure.kjonigsen.net> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=casouri@gmail.com; helo=mail-pg1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301173 Archived-At: > On Dec 11, 2022, at 11:56 AM, Jostein Kj=C3=B8nigsen = wrote: >=20 > On 11.12.2022 18:40, Eli Zaretskii wrote: >>> From: Juri Linkov >>> Cc: "Ergus via Emacs development discussions." = , Yuan >>> Fu , Theodor Thornhill , = Eli >>> Zaretskii >>> Date: Sun, 11 Dec 2022 19:09:46 +0200 >>>=20 >>>> 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. >=20 > That's an easy change. >=20 > Attached is a new patch which moves the code-file to lisp/textmodes/ = and also makes it derive from text-mode instead. >=20 > Are there any other changes I need to implement? Looks great! + (unless (treesit-ready-p 'toml) + (error "Tree-sitter for TOML isn't avilable=E2=80=9D)) 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