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: Tree-sitter and major mode inheritance Date: Sat, 19 Nov 2022 13:45:41 -0800 Message-ID: <1FE7635A-F90F-4198-AC97-922BA312C305@gmail.com> References: <0249C656-21C8-49F2-B979-A1894BF80637@gmail.com> <1B76E73A-0DCD-456E-9F28-0E90723DA66D@gmail.com> <83sfif8cl2.fsf@gnu.org> <386C85F3-C183-4C00-B19B-8D4E1B254E89@gmail.com> <831qpy96ha.fsf@gnu.org> 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="27918"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org, theo@thornhill.no To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 19 22:46:14 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 1owVfC-00074F-Da for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Nov 2022 22:46:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owVeq-0007RY-2g; Sat, 19 Nov 2022 16:45:52 -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 1owVel-0007PG-Ne for emacs-devel@gnu.org; Sat, 19 Nov 2022 16:45:47 -0500 Original-Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1owVek-0001mO-6l; Sat, 19 Nov 2022 16:45:47 -0500 Original-Received: by mail-pj1-x102c.google.com with SMTP id w4-20020a17090ac98400b002186f5d7a4cso7708738pjt.0; Sat, 19 Nov 2022 13:45:45 -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=zKVovCB5PeBaWHulNrH9xrdQIw1GcNiXblBOrKu4lp0=; b=itpnedj5jEjqAS1whe4hILD7y/+ojuh+KfMaWNmaC5X5vn98jba01cuhkxB++Lom5m 7uy1Hf9Q/qQcEKnxaI9jrzHrLEvCxFX1cOSo3UNXvMWsHiSfjolu9zrWkXhsRcD6CBnp DiISV4lO+UOwJvtvkB2LAiHQfFDDjT4xNMMfZ+tjqo1DD+ULsy+AidyK+UYtDIxCZmo+ EZP9avMKlrxpVI36n7W70mdbVHLdLL53fvyXykcVUkaeEsWUkMQltFALdvVVrDUHHZR1 wkjFQlxzpP1FUvUZRC/YAwrw2vfMIhkf932yT8gynRl430UlNaZQfHE9v2Dm40J4yvE2 Suig== 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=zKVovCB5PeBaWHulNrH9xrdQIw1GcNiXblBOrKu4lp0=; b=ZwuYSr8r+wPhQkfgIWEdeJsnVsln6OLequylJYyQrPGy5h4p+SCnlckedmyjJgBWZt ELLfS9YhvELEbC22lFTSLZLAInnxvtvZvZo0jJxUoJxVemhAo/cd2m/v6vGnuSmAfPcF f/dXdzQ3NNH2YEpqerR8T15HSoIRD9zbpJTfRWHB5n4IwnfTg0hGJauSNmVS12WdxP6/ wnamawc/ADtsWa5tUm1+q4vLKRBdc0zpWx+yhVVjHigPhUDE6dKmGbetP9JUffkTE77B 4fqpRNdlSuFVhVY3DggJaI06zNGcVyKt++kSfMwg4sOyioZ6PCczRgpdvz9BD91JB+f2 lWbA== X-Gm-Message-State: ANoB5plPc20974BxN5xAHZOaMMFII4yrsiP9zGG7/unhslyKCIq0C73q I0sSybYYQxN3KTD7skVS+LvI+VoO+os= X-Google-Smtp-Source: AA0mqf7YiUB1yR3sDOQrl6HleLvxqLrYTVeHrwa8aIRr792RdaRdlI3Zl//ANNYB5MoKi/pdCxnIUw== X-Received: by 2002:a17:902:bb84:b0:186:e222:9f05 with SMTP id m4-20020a170902bb8400b00186e2229f05mr5393997pls.61.1668894343896; Sat, 19 Nov 2022 13:45:43 -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 o65-20020a625a44000000b00562664d5027sm5591475pfb.61.2022.11.19.13.45.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Nov 2022 13:45:43 -0800 (PST) In-Reply-To: <831qpy96ha.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=casouri@gmail.com; helo=mail-pj1-x102c.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:300208 Archived-At: > On Nov 19, 2022, at 9:52 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Sat, 19 Nov 2022 09:17:11 -0800 >> Cc: Eli Zaretskii , >> emacs-devel@gnu.org, >> theo@thornhill.no >>=20 >> If we are already renaming existing modes (cc--mode), why = don=E2=80=99t we use the generic name -mode for the virtual parent = mode? It would be nicer if the generic mode (-mode) is an actual = mode, with mode hooks, keycaps, etc, rather than simply a dispatch = function. >=20 > I already said that I prefer not to rename existing modes. Such > renaming will break too many init files and other Lisp programs. I guess we can at least try it for a bit? Because hook, keymaps, etc, = should just work, that=E2=80=99s the point of major mode inheritance, = after all. C-native-mode will run all the setup for c-mode, plus setup = for c-native-mode. Yuan=