From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Subversion of user chosen major mode by Emacs. Date: Thu, 30 May 2024 01:10:04 +0300 Message-ID: References: <86r0dmtbk2.fsf@gnu.org> <63afa31a-7874-4d1f-a17a-14a64ba516cb@gutov.dev> <4197c4a8-ee12-4fa7-9201-4d26f3be59c6@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3050"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Stefan Monnier , Eli Zaretskii , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 30 00:11:00 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 1sCRVb-0000WC-HA for ged-emacs-devel@m.gmane-mx.org; Thu, 30 May 2024 00:10:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCRUr-0008UT-I1; Wed, 29 May 2024 18:10:13 -0400 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 1sCRUp-0008U4-Ap for emacs-devel@gnu.org; Wed, 29 May 2024 18:10:11 -0400 Original-Received: from fout5-smtp.messagingengine.com ([103.168.172.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCRUm-0006Ng-Kg; Wed, 29 May 2024 18:10:10 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id A191613800C0; Wed, 29 May 2024 18:10:07 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 29 May 2024 18:10:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1717020607; x=1717107007; bh=91W8QtMZ/aikUnSwrBcBeeGpzlcfCA89+rLNoqL51fs=; b= DpLqjy9/3AmOFE8LJHnOjWWN6twXwZLcyUKC1Jsf/CVZ7f9SiQJoC9bca6p4DaJO ArYJXxly9tj3khDVFiYHutLr4fbG+l6gVUd6TPdw5vdgl3EAXeuf6MzCG6GiTJ3n QWJgn5KA2MELbZhNSsSEA0Q0Cnv1MILV/qEDlIyzyzidOIWKXUQzM9ZZCC3hRu2d Ev1w/5iy3HsuhxZNiAUwD2+7AgpmpdGsEAE8jI8/M23b3Kuf/xPGv3/699YRFRdz XT4wj9aLWEXd2GZvqvryzajlyhNWwtlBCfh3J3+h7R7C1zIS4nFWG6hU5+jCPI2x 2T5+DA4e66FzboE/v25ROg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1717020607; x= 1717107007; bh=91W8QtMZ/aikUnSwrBcBeeGpzlcfCA89+rLNoqL51fs=; b=m dm+s9MlN/TUckmZYWym8dnFdHz3QGZR9+Y6OVH9SZnGiGb6e7HkmM0oW+/9NYq58 jnl7Q4QuG4OT8u/rsyY6rOFpEDuqS9xqdmaROvyyoZLmB2dz4peGeR9L5qUOs+03 1taCKbDqDrejjpsYu947MkqZmYfh4+QBZsnr2B4/RVq2CiS0HF2u0v2Q6zmpSoJP X3IpiJduj9PS9BI0/yWro+NDLyNfX7qltWf98KyM95aAGUPORt6PznQSCUH6JMf7 FN41lupTo3RbXzoXjn2SZZ9D1zBqKiCkHbHOi82Dp6mZnN8Pz7LTOWdZ27iJeXNe l/9DsaAu8Y2kiNqrqyYFw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekvddgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 May 2024 18:10:05 -0400 (EDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=103.168.172.148; envelope-from=dmitry@gutov.dev; helo=fout5-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_SBL_A=0.1 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:319713 Archived-At: Hi Alan, On 29/05/2024 22:22, Alan Mackenzie wrote: >>> I've just had a look at that commit, and it simply adds entries to >>> auto-mode-alist for the *-ts-mode modes in the traditional, normal and >>> acceptable fashion. CC Mode does the same. > >> That's not the same thing: all CC Mode entries are behind ###autoload, >> meaning that the alist does not actually change when you load the file >> (as long as the autoloads are properly generated when you build Emacs). > > Ah yes, you're right. The entries to auto-mode-alist in cc-mode.el are > in comments (autoload comments), so that's one reason loading CC Mode > doesn't put those entries to the top of the alist. > > To be honest, I'm surprised that c-ts-mode and friends haven't come to > have autoload entries for auto-mode-alist, superseding those in CC Mode. > Perhaps if this had been done, the unpleasantness caused by > major-mode-remap-alist/defaults could have been avoided. IIUC, the current state of affairs is an attempt to balance the needs of users who want to test out and use the tree-sitter modes with as little friction as possible, against the needs of older users who can get annoyed at the switch in the defaults (and the extra work required to install the tree-sitter libraries, bug#60559).