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: Fri, 15 Nov 2024 10:13:25 +0200 Message-ID: <86plmwj4nu.fsf@gnu.org> References: <86r07elwoh.fsf@gnu.org> <86h68al2qz.fsf@gnu.org> <867c95kaye.fsf@gnu.org> <861pzdk4aq.fsf@gnu.org> <86zfm1in2p.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31129"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 74339@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 15 09:14: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 1tBrTJ-0007ur-Tv for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Nov 2024 09:14:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBrSu-0000fJ-5j; Fri, 15 Nov 2024 03:14:04 -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 1tBrSs-0000f3-S9 for bug-gnu-emacs@gnu.org; Fri, 15 Nov 2024 03:14:02 -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 1tBrSs-0007Te-JU for bug-gnu-emacs@gnu.org; Fri, 15 Nov 2024 03:14: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=TSxDhW8Oi8rHxQx+PjUy9Tj4gUZR7qwe84PghLCH6Go=; b=BdOo18Lw9zNhF1N17KOwKnvmaVzjJyNyV7BYoBBXKI2yBXmNn/v3WspimXUBD85trZE00MspV+lw17ZhRFu4Sxs/UQ4RpupVcuUBBFRvlnv1hHZ8H5v6aGRNZ0j+JlnNN5/5Zud6EBSAvti/tsTui+WpySr1ztvcH8ND1o0JZHrnLrJTgRpezVlkaawA/RYXxSj2C76c/hkYUSBmci0PrZbjPnQnylDhdEftYEwiPn9ABwA8lpapVM4KyvEMzqwj9OeS+6DW0Z+UgNlGMv/ML1xmB+Vy5q2BomB2vSXGe+BE09RGi8/TakF6wBcGRW3i6naBElmcTD3ZWxTnCS3Z4w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBrSs-00085Q-DW for bug-gnu-emacs@gnu.org; Fri, 15 Nov 2024 03:14: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: Fri, 15 Nov 2024 08:14: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.173165843431061 (code B ref 74339); Fri, 15 Nov 2024 08:14:02 +0000 Original-Received: (at 74339) by debbugs.gnu.org; 15 Nov 2024 08:13:54 +0000 Original-Received: from localhost ([127.0.0.1]:48451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBrSj-00084u-I6 for submit@debbugs.gnu.org; Fri, 15 Nov 2024 03:13:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBrSh-00084g-5n for 74339@debbugs.gnu.org; Fri, 15 Nov 2024 03:13:51 -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 1tBrSb-0007SK-1v; Fri, 15 Nov 2024 03:13:45 -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=TSxDhW8Oi8rHxQx+PjUy9Tj4gUZR7qwe84PghLCH6Go=; b=Wxx9ytAGSBon lQRAivlt4VmE8v4BoJKjQzakaYWubXHLlIDCQFdgZ4ksR2lHxs2WMBMBnH+PEvtXE6WD3td1UbiZG lX4vw66Du7FUpI/LN/i/n/cPgiRw13/smr23LSjNofotz8f8X7UbfvUzxLQqT7YwFEwZGX4Xc/oSp JmhZ4txJcqfvkCXx9HSHo+5xuWuKVbHCjLSIlo2+BbNYrL/kwTBVWJD5V1wxRZHGcu5UKw9kHlp7/ jYnSyBbQD7unNNHa/VwzGzdIE++DbEZTcy3ST3cT66N5Jgd3ID+ljoFKcdSOwZIdlQTuSdaS8tvB0 V3o6UQypgZmI6XrTxo1Jkw==; In-Reply-To: (message from Stefan Monnier on Thu, 14 Nov 2024 16:06:01 -0500) 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:295385 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , 74339@debbugs.gnu.org > Date: Thu, 14 Nov 2024 16:06:01 -0500 > > >> 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. That's true, but only if the other elements whose car is c-mode were first removed with 110% reliability. If we want to be absolutely sure that c-mode spec invokes c-mode and nothing else, adding '(c-mode) is more reliable. > 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`. Right.