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: Mon, 02 Jan 2023 23:07:49 -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> <83358u4st4.fsf@gnu.org> 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="27058"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 03 05:08:08 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 1pCYat-0006pu-2Y for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Jan 2023 05:08:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCYad-00024s-0j; Mon, 02 Jan 2023 23:07:51 -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 1pCYab-00024a-RB for emacs-devel@gnu.org; Mon, 02 Jan 2023 23:07:49 -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 1pCYab-0007fQ-Iq; Mon, 02 Jan 2023 23:07:49 -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=rGK0R6CTMOJwLUwPxDJXgxY8srZLnMr6N90tfPZ8XnY=; b=gdLGPe9hxLZP 7HGr0nlL6NIZXeesvKY8UZ/Q9FDC56kWVi7CXyCvT+s+dIw/W4h3WCOn7LuSIwLHqDfiQZ1iK/emj T/6hlcHX9T669PJydfq0N0GtNR+JTH8pP9WUlYFex8jb+5fQRIOSApQrvnYaPFDarKtfU/87kV3c2 OuA9gKiZqG3d2UIqnc1IDxt5Eomn364x6dF8oZE17m8c2AsvSjCAohMdNkZkklwmURrUy4M3Ehs0N f4v7vdOirj93O+ZWFlC9zKPJAKo8AnKkmV8aDWRWopwjh661c0GOXdtcMWB/ynwLwNPUc4n+unsa0 GKZyYhdDaA8BJ8mkAjZm0w==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1pCYab-00086d-B1; Mon, 02 Jan 2023 23:07:49 -0500 In-Reply-To: <83358u4st4.fsf@gnu.org> (message from Eli Zaretskii on Sun, 01 Jan 2023 09:28:39 +0200) 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:302204 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. ]]] > And the features based on tree-sitter are not limited to > fontifications, they also support indentation, navigation by defun and > other language-dependent program components, and Imenu indices of > functions, structures, etc. Each one of these needs to change quite a > few functions and variables of the particular major mode to switch > between tree-sitter and the "traditional" ways, and we also needed to > introduce a lot of new data structures that are not needed for the > "traditional" modes. I know. I don't think that precludes having tree-sitter be a minor mode. The major mode command could set some variables that are used only when tree-sitter is off, and other variables that are used only when tree-sitter is on. > I considered that to be "a bridge too far", and > instead decided to go with a safer, simpler alternative that we have > now. It sounds like you consider the current design as a _temporary_ expedient. If that's what it is, maybe writing this first was a good idea. I'm talking about how the code should work after there is time to take stock and clean it up. -- 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)