From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Validating tree-sitter major modes and grammar Date: Fri, 20 Dec 2024 14:24:05 +0200 Message-ID: <86jzbua6fu.fsf@gnu.org> References: <2F1CA2E3-4C86-4892-AF6B-0C9CFCE26629@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9766"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, p.d.oliver@mavit.org.uk, bjorn.bidar@thaodan.de, stefankangas@gmail.com To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 20 13:25:06 2024 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 1tOc42-0002Py-Ov for ged-emacs-devel@m.gmane-mx.org; Fri, 20 Dec 2024 13:25:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOc3O-0004iE-Fw; Fri, 20 Dec 2024 07:24:27 -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 1tOc3J-0004hj-KK for emacs-devel@gnu.org; Fri, 20 Dec 2024 07:24:21 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOc3F-0006kn-Bc; Fri, 20 Dec 2024 07:24:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=bCaTpvWaXwUnWctpihXxd+Ic1ycOPQnDVRqA8jza/xY=; b=KyirkKHiehOFtV/zKt3h Uoyix3w551o3yH4JnH1I6e7Jd5eLTKapGi702D4k2sOAmfxYkp/z0/rPAoetOA8pnr39H57bj7CUw GhR5F4xNoLnIwyptfdUvY14B8AJVbJqrarwGes062eNViU/e7kRsR0Bk7Uzwba9B9OWtWgc3e/r1O oxDQkoGYUoLKg4C9vFMdFlb475LQulPcdNwTAp4mBsmyQW8COKVOiUV0NQiV22Czimny5rSe0TfdK KMABMZtbinBszYpsPl867M+sJstT5B+tKgMK8NGzwH4hkQw9iTWhNKD8w/ErF15KRsXuOnNrJdYfJ iD2DdEzR7MTLYQ==; In-Reply-To: <2F1CA2E3-4C86-4892-AF6B-0C9CFCE26629@gmail.com> (message from Yuan Fu on Fri, 20 Dec 2024 01:09:10 -0800) 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:326797 Archived-At: > From: Yuan Fu > Date: Fri, 20 Dec 2024 01:09:10 -0800 > Cc: Peter Oliver , > Björn Bidar , > Stefan Kangas > > Continuing from the tree-sitter maternity thread, I cooked up some script to go over each builtin tree-sitter mode, clone the grammars it uses, and check whether the font-lock queries are compatible with the latest version of the grammar. If everything works fine, the script adds some comment in the source file listing the version that was checked. > > For example, I ran the script for c-ts-mode and c++-ts-mode, and this is the comment inserted to c-ts-mode.el: I'm not sure what exactly you are suggesting, but commands and Lisp programs that are for the Emacs maintainers (as opposed to users) should be in the admin/ directory, not in the lisp/ directory. If you think this should be used by Emacs users, please describe how would a user use such a command, because I don't think I understand that.