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: Tree-sitter and major mode inheritance Date: Sat, 19 Nov 2022 12:26:17 +0200 Message-ID: <83sfif8cl2.fsf@gnu.org> References: <0249C656-21C8-49F2-B979-A1894BF80637@gmail.com> <1B76E73A-0DCD-456E-9F28-0E90723DA66D@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30122"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, theo@thornhill.no To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 19 11:26:59 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 1owL3q-0007Z5-9X for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Nov 2022 11:26:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owL37-000724-B7; Sat, 19 Nov 2022 05:26:13 -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 1owL36-00071w-Bl for emacs-devel@gnu.org; Sat, 19 Nov 2022 05:26:12 -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 1owL35-0006CQ-10; Sat, 19 Nov 2022 05:26:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Pg0mtzC8S0n3VL417hREdpmJMeZOpAwfbv02X3bh4Rw=; b=SOwaz+2aEaJQ HZXBl5bqjLFnIDOzo28kN9ECXeMUnTWRELkA46eDBJY8nBckxa+8cWxu1HklgsU4JOV7LwkS0nUqD A037z4k4Ue8Q92l6ypvBytm93my2loYnpu0RfLhRblvEfnZD0peD1y7RMim+PZUE+9Dlcz3OoU7Rm hXHIgB89KeUksHwZcluake0zJyxJxpmDwpP4FQNGhnDfCOtNp2oGugqXAAJmAUB6b3RtaxjN0kiCw shmQJlxwXCdlZhZ98UnEI2oInHxtKXL4BelPfw96Px561uGafqc8opHsjkZIvEf8aL0VyDwaSaI+4 JlhlUW0a1ofp6tgz6WKC5Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owL34-00058p-HD; Sat, 19 Nov 2022 05:26:10 -0500 In-Reply-To: <1B76E73A-0DCD-456E-9F28-0E90723DA66D@gmail.com> (message from Yuan Fu on Sat, 19 Nov 2022 01:41:47 -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:300147 Archived-At: > From: Yuan Fu > Date: Sat, 19 Nov 2022 01:41:47 -0800 > Cc: Stefan Monnier , > Eli Zaretskii , > Theodor Thornhill > > Anyway, does anyone think this is a good/bad idea? Should I go implement this on css, js, c, etc? It can also be the other way around: instead of having c-mode being the virtual mode, we can leave c-mode as-is, and have a c-base-mode inherited by c-mode and c-ts-mode. And similarly rss-base-mode, rss-mode, and rss-ts-mode. I'd prefer leaving the original modes as-is. That should cause less compatibility problems, I think. Stefan, any thoughts?