From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74339: 30.0.92; CC Mode stomps C TS Mode Date: Thu, 14 Nov 2024 22:21:02 +0200 Message-ID: <86zfm1in2p.fsf@gnu.org> References: <868qtnfd2d.fsf@gnu.org> <86r07elwoh.fsf@gnu.org> <86h68al2qz.fsf@gnu.org> <867c95kaye.fsf@gnu.org> <861pzdk4aq.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13121"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, monnier@iro.umontreal.ca, 74339@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 14 21:22:46 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 1tBgMX-0003Gy-Uk for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Nov 2024 21:22:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBgLz-0003JB-DJ; Thu, 14 Nov 2024 15:22: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 1tBgLr-0003Hv-0C for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 15:22:03 -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 1tBgLq-00066G-CW for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 15:22:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=RxJ59VyXC/RMPgntlD8b0d7LsBxsbcxx6cZO1ulQP5I=; b=EGCQIZo1YXAwokmOANpircsnZFqfjqgEfpfO7nEsZYeN8HLaPHNHIeHz03XSkR9FssGHZ1eSCtszl6Fn1OL3WwhgCmafL2DFL1VTcsEytl8gqsUWWKMBrumgnE3dlfl25xb5twL484TgtGWs0maAtN0+zSlLaUj5/cTGjjj6w2YKKhfil3QmcuLqJdodQrcy86QQUdMehGH+mka1fbIZgphuEl6Jq9JW0HQvbKDz2O1VCCAbylGtWyA41PniHN0CwWpQXZxTGc9FGzrAwNa9d+L5fgDmuEJbvhX5NVkBomMv6yhi5FTNcMrDDDXXFSnI9QPNzfnsN9g9TQrS+4TFPQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBgLq-0001sJ-7k for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 15:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Nov 2024 20:22: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.17316156887122 (code B ref 74339); Thu, 14 Nov 2024 20:22:02 +0000 Original-Received: (at 74339) by debbugs.gnu.org; 14 Nov 2024 20:21:28 +0000 Original-Received: from localhost ([127.0.0.1]:47361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBgLI-0001ql-0t for submit@debbugs.gnu.org; Thu, 14 Nov 2024 15:21:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBgLF-0001qS-15 for 74339@debbugs.gnu.org; Thu, 14 Nov 2024 15:21:26 -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 1tBgL8-00063U-1K; Thu, 14 Nov 2024 15:21:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RxJ59VyXC/RMPgntlD8b0d7LsBxsbcxx6cZO1ulQP5I=; b=JKi3tjKSMz40 moUkFFPWOBBpvOd217JHKyJkSQJD3D5/U8TygTmKQFV4iZ6NKRkEp17JToVz/UcWKV+LrW+8kFn8z nqFZBNPPtwy4zthcfOFPCKc5HYG5I5zGDmDdJK5MiPUkQlQdDIa05A86lGeapvnUgQEg/WuVk/Z7X FJAbXv3ODMbYo8Oo2yszXR0GM+JJR1W3DR53bYNpjUhcggz1oQt65D8FTDZxgB1unDZHY47ZJyP9a uo3wGcan9Rc8NUIChSFpPtClnM3YZDs2lQhZSPaIZ/17Sm38LMRP//FS+m2gWrZ53YdggQtfAe0TM OUWrRr2KD34cUT5QdDqibQ==; In-Reply-To: (message from Alan Mackenzie on Thu, 14 Nov 2024 19:53:33 +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:295364 Archived-At: > Date: Thu, 14 Nov 2024 19:53:33 +0000 > Cc: 74339@debbugs.gnu.org, monnier@iro.umontreal.ca, acm@muc.de > From: Alan Mackenzie > > > I prefer to make a simpler and more localized change, which only > > manipulates major-mode-remap-defaults. I would not like to risk > > changes like modifying auto-mode-alist, which might have other > > unintended consequences, at least on the release branch. > > I thought we'd agreed to fix things by modifying auto-mode-alist. I wasn't aware of that. I apologize if I missed some words to that effect. I thought we were always talking about fixing the values pushed into major-mode-remap-defaults. > What we definitely agreed was that the old modes and the tree-sitter > modes should be handled symmetrically, and that C Mode and friends > wouldn't be disadvantaged. Yes. > > Let's stay with major-mode-remap-defaults, since we already understand > > well enough what the code does, and need just to tweak it in minor > > ways. > > OK, then the following suggests itself. We have symbols like > `current-c-mode' which would be remapped in major-mode-defaults-alist, > and would be the cdrs of the entries in auto-mode-alist. We would remap > `current-c-mode' each time cc-mode.el or c-ts-mode.el was loaded. This > would avoid the need to modify auto-mode-alist at run time, and also > avoid all the disadvantages of remapping `c-mode' itself. There's no current-c-mode in Emacs now. So doing it that way would mean significant changes to Emacs, and I'd like to avoid that on the release branch. What I meant is to modify cc-mode so that it removes the entries pushed to major-mode-remap-defaults by c-ts-mode and then pushes its own entries which map c-mode etc. to themselves. And c-ts-mode will be changed to do the opposite. This is a small, localized change, which will leave everything else intact, and will allow users to express their preferences by just loading the mode they want to use.