From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Unifying "foo-mode"s and "foo-ts-mode"s Date: Sat, 31 Dec 2022 22:03:55 -0500 Message-ID: References: <877cyagmti.fsf@posteo.net> <831qoi85u7.fsf@gnu.org> <87mt76f4n4.fsf@posteo.net> <83sfgy6l0n.fsf@gnu.org> <877cy9b1k0.fsf_-_@posteo.net> <83zgb55409.fsf@gnu.org> <87fscw9av0.fsf@posteo.net> <83sfgw6g8m.fsf@gnu.org> <87v8ls7u0j.fsf@posteo.net> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27374"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 01 04:04:38 2023 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 1pBoeM-0006tq-3t for ged-emacs-devel@m.gmane-mx.org; Sun, 01 Jan 2023 04:04:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBodh-0005sP-Eq; Sat, 31 Dec 2022 22:03:57 -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 1pBodg-0005s6-6A for emacs-devel@gnu.org; Sat, 31 Dec 2022 22:03:56 -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 1pBodf-0007Dm-U7; Sat, 31 Dec 2022 22:03:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=7I+UIoyv/0yU5IYal6zDvVnUX92/QXiWhJspKfGofk4=; b=nGeKDYAaaieu J0MBdGVxGNodSrC6/0fFGKywFqPn/XnaeeyLW/1+TSeMn3v3XqqSxbyBUEHNVNva0wte9T+s0gzU/ IAp6CjanKAfYyGZN7tswSyQTNv+eEEHEnQ8cqxnnRvpozTBr2sKqyfVCSHvs/MzggZ948uLxDMfjK U0LQoBHoOhMWCLLo80eHErtxXPHw/UhmeJVdLVLE/lLIxKwkeQ5ZtP6Ns+8TqZsUlzPFlpIAlZz+C z4mJoBxN3c6QvAohHjSVL5daqH+YD98FVbmDQNdoY3d2GfEWlE2ocCOUrWLE2tuq38vuSefMoJN/6 u7dGklMfzs5UW89GoSibyQ==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1pBodf-0004h5-Mr; Sat, 31 Dec 2022 22:03:55 -0500 In-Reply-To: (message from Stefan Monnier on Fri, 30 Dec 2022 11:30:44 -0500) 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:302169 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] The use of tree-sitter logically ought to be a minor mode. We don't define c-mode and c-fl-mode to specify whether to enable Font Lock mode in a file of C code. Rather, We have c-mode, plus another orthogonal command, font-lock-mode. Likewise, the Emacs user interface ought to have another minor-mode command, tree-sitter-mode. How it "really works" under the hood is another issue. Users will be able to control the default for enabling tree-sitter in various major modes with the existing general mechanism that is used to control whether to enable Font Lodk mode and other minor modes: the major mode's mode hook. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)