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: Thu, 14 Nov 2024 16:06:01 -0500 Message-ID: References: <86r07elwoh.fsf@gnu.org> <86h68al2qz.fsf@gnu.org> <867c95kaye.fsf@gnu.org> <861pzdk4aq.fsf@gnu.org> <86zfm1in2p.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="28761"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 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 22:07:30 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 1tBh3q-0007LF-3C for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Nov 2024 22:07:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBh3S-0007GS-Hs; Thu, 14 Nov 2024 16:07:06 -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 1tBh3P-0007Da-IA for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 16:07: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 1tBh3P-0000nK-1p for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 16:07:03 -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=NoqRjZGEPZA+BCmzV6DwfnAQnsbONZwJKMJ4nxDM7LA=; b=WLB9/Q+2dIhe2sVv+s3vR34R7OlHo9v1cXpJq1RdexsPgzcaAM6wERtNGRdc1ngb/wB7EC23PzpzB7UNsWbiaxBZaCi2eHcih7RzYRgpcQkBY3phSf//Fwtpi/NZvYosSSqKFslkKIFym3z8l5cAyBWGOMZc9XEg2q9FKYZgE0XcRnHFEpwsNiyEjAe1MpttsU6fZBJITfvK2wP2m3jJpCNsL1GW53D28Ekrlom6rlC1A0xVt9FXLgPcrbsy+gCqkj0tJ2oQo1ZdjqotHuslIBXrkoBIV/UcqPHqrILezwnndkS7Bqn2Pp/RgZPGupitDwP9SugH1yAo8FSlFWVxQw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBh3O-0003wd-Jz for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 16:07: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: Thu, 14 Nov 2024 21:07: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.173161837015074 (code B ref 74339); Thu, 14 Nov 2024 21:07:02 +0000 Original-Received: (at 74339) by debbugs.gnu.org; 14 Nov 2024 21:06:10 +0000 Original-Received: from localhost ([127.0.0.1]:47484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBh2X-0003v3-OQ for submit@debbugs.gnu.org; Thu, 14 Nov 2024 16:06:10 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBh2W-0003ul-FH for 74339@debbugs.gnu.org; Thu, 14 Nov 2024 16:06:08 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7D37A805DE; Thu, 14 Nov 2024 16:06:02 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731618361; bh=ygl9b3rQxh34nJkAEHX+vzhSJgx6HbtmRwi/XbAPpFc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=XMvastWkfTqcI726o+VyfHvo94eQFqZTRIbBT9KPZbYKsyUDugNCsEnVDxxZKlvjs BTZdzkgY3X4MSk/L9wqex9EA2+IDh96nuNuFLjUUpJW7v0pXFT017rrcPX17oQUvOx yDIuRSIGjV3bp3KTGy0xdQfakIK15r7bStV2WgG1qw9ansSZY4jdq1C5IU3+Mvcokj 1pwIo+Boz/U/QCMFtmT5FjNbTxcICFeBEnTZFOlLCheWRjoxZxL55hhl5ppg02ORNK I4DJE1uZbaGbjHZiMJsgkOsnXC1ehuBqtHlE1RX2gZwD2ygZtIbiRgICPFiiTj8D4X D0dn7PTuoHRiQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A86948001E; Thu, 14 Nov 2024 16:06:01 -0500 (EST) Original-Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 89ED11203DA; Thu, 14 Nov 2024 16:06:01 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Thu, 14 Nov 2024 20:38:40 +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:295369 Archived-At: >> 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. For `major-mode-remap-defaults`, mapping `c-mode` to `c-mode` behaves the same as when there is simply no entry mapping `c-mode` to anything, which is why the code I suggested (which just removes any previous remapping of `c-mode`) should give the same result as what you describe. > How is that symmetrical between c-mode and c-ts-mode? The very nature of > the entries you're intending to make in major-mode-remap-defaults is > asymmetric, in that they would remap `c-mode', but wouldn't remap > `c-ts-mode'. Or have I missed something? They'd be symmetric in the sense that the mode used by default is the one that was last loaded (with a "default default" of `c-mode`). The apparent asymmetry is compensated by the fact that the entries in `auto-mode-alist` always say `c-mode` and never `c-ts-mode`, so there's never a need to remap `c-ts-mode` to `c-mode`. Stefan