From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74339: 30.0.92; CC Mode stomps C TS Mode Date: Sat, 16 Nov 2024 01:17:41 -0500 Message-ID: References: <86zfm1in2p.fsf@gnu.org> <86wmh5hrya.fsf@gnu.org> <86cyiwimlr.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37599"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Stefan Kangas , 74339@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 16 07:18:33 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tCC8f-0009gR-Am for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Nov 2024 07:18:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCC8J-0001ZG-4j; Sat, 16 Nov 2024 01:18:11 -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 1tCC8F-0001Yz-8m for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 01:18:07 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tCC8A-0001oz-Vd for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 01:18:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=FJb+fAQu28O/9WQZT496q09EDvKbmbTkDf+d7GBmWjU=; b=Py11yRmxVvVaVPkeWlddmn4KGnouvHpUGlkZJnIJag3x9w6GwsWAfsLS3qIkjRh1Nml25rDTR1Q4/qOaAR6RZAJpPHqKMYa/ZF8JESLlI/Pc7FHHa1LldBQ+g2HaLBvcXgza9lPMbSHDrIkHrg4G610dbzbqKi5r+pUj0s7jcIfsZr+HZTrjmgpqvEyjWfyNCShSxpCkAv5KBkgxJrAQRowVLBEKRuLXI47RcGjZasdVJr6NTnufYr5wRk1vdB06u2TgsBqnA8xjlPs/YMg3Ae7vHgBM+/dSVvnIf+jvCaaTheKHbauHa3cVdYhatYDns/es9Ozd5o7HVwgoE2i3gA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCC8A-00082Y-MJ for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 01:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Nov 2024 06:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74339 X-GNU-PR-Package: emacs Original-Received: via spool by 74339-submit@debbugs.gnu.org id=B74339.173173787430889 (code B ref 74339); Sat, 16 Nov 2024 06:18:02 +0000 Original-Received: (at 74339) by debbugs.gnu.org; 16 Nov 2024 06:17:54 +0000 Original-Received: from localhost ([127.0.0.1]:51816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCC82-000829-1z for submit@debbugs.gnu.org; Sat, 16 Nov 2024 01:17:54 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:22307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCC80-00081s-5a for 74339@debbugs.gnu.org; Sat, 16 Nov 2024 01:17:52 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 78FB84405DE; Sat, 16 Nov 2024 01:17:45 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731737863; bh=73XlPf4l1ipz9q0Xk5KRc5+yzaIZKwYgwsn2Qf3+kG4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ohKbDypllZRm8G1c4jfSYwF9XyDXN3a71IWVosgYx68X0Pjfn5v4gW9Psjipj04kL BcoZCfvGr++0Them4BDHeD9IJRffcZTYMeDEMzn6hrgmUMxmy/hfIIUlfYhIM/hO6k Z7DFKs5oA6fDSU89MJn//Qt4/2trdWvoY4rtCe1yxcHaijPaniJKbygdB4BAOAMscv wv8quDq3l0wpv/sSIqNbwmsevTQFaXrKcpIz+TK0isI+RnB9sdPGbC/pHP9TzimHCo RwFIl6NPPe+gCtX1WnPyFfRcZ5UFyZ008ANINLQRFHgn9diBh8r27CnN0WU5MjJoJM +6+QwuD6Cme1A== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D2AA64404BD; Sat, 16 Nov 2024 01:17:43 -0500 (EST) Original-Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8FA7D1201A2; Sat, 16 Nov 2024 01:17:43 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Fri, 15 Nov 2024 21:56:03 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295431 Archived-At: > No, that is the problem. Have a look at major-mode-remap-defaults, and > how c-ts-mode uses it to cause the symbol `c-mode' to start c-ts-mode in > certain circumstances. This is what I'm unhappy about. In which way is this worse than what we have in Emacs-29 where loading `c-ts-mode` does things like: (add-to-list 'auto-mode-alist '("\\(\\.[chi]\\|\\.lex\\|\\.y\\(acc\\)?\\)\\'" . c-ts-mode)) (add-to-list 'auto-mode-alist '("\\.x[pb]m\\'" . c-ts-mode)) ? > That "somehow" is the loading of c-ts-mode. I think that even C-h f > c-ts-mode counts as an "explicit indication" of a supposed preference for > c-ts-mode, given that it loads c-ts-mode (if it actually does). Yup, and the same happens in Emacs-29. > I don't think the current mechanism is ready for the release of Emacs 30. I don't see a regression here. > We don't have fine enough control. /* mode: c */ followed by /* > c-basic-offset: 4 */ in the Local Variables: section is a sure sign that > C Mode is intended, not a random C handling mode. In your head, maybe. I think for most users of other C modes (e.g. `c-ts-mode` or `sm-c-mode`), the /* mode: c */ thingy just means that this file should use their favorite major mode for C. > What I think we're lacking is an explicit setting or command for the > user to state what her preferred mode for C actually is. You still haven't explained why the user's personal preference about the major mode should be stated in the file. Stefan