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 21:23:41 +0200 Message-ID: <861pzdk4aq.fsf@gnu.org> References: <868qtnfd2d.fsf@gnu.org> <86r07elwoh.fsf@gnu.org> <86h68al2qz.fsf@gnu.org> <867c95kaye.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17858"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 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 20:24:37 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 1tBfSG-0004Su-MQ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Nov 2024 20:24:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBfRr-0006MW-FA; Thu, 14 Nov 2024 14:24: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 1tBfRk-0006LK-Be for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 14:24:04 -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 1tBfRi-00016q-Sd for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 14:24:03 -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=aLowMLnVNXDaJZ5y9HR2YUKAwT7ZA7Jpe1mxrWC3QRY=; b=guCvGDLZ2ddVAEbG0nWZboUjtgJN+85bgv2ovedcn3gZmjNF868Vze2br8H+uoZrpdBQq2DYcrTOaltNz/FOFpfCPp98aaJVEQ2X4EmY7q3gx96Ci0smZooWY/YEqOTfAiu7FoIXYEPX9Rli/dsD6NUPOFUxrR+KkD5v1PS6ZWGJcd1woaFdw3NDA5KASrxLLr/oJvdY4C1RBJeKd36R68N4VpUKgzpMIOIqGyy0So5lHPvUGQuBZZOo/ikP2R1zv0k5icDMPIu7z8WoQfBuQgSSpVa8qvuemsFtNVRzxPO0tydm14KHAsvkkTasavzsOsn+UmAWGXz/Igl3XJ7b+w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBfRi-0007Ss-Ml for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 14:24: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 19:24: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.173161223228667 (code B ref 74339); Thu, 14 Nov 2024 19:24:02 +0000 Original-Received: (at 74339) by debbugs.gnu.org; 14 Nov 2024 19:23:52 +0000 Original-Received: from localhost ([127.0.0.1]:47219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBfRY-0007SI-BI for submit@debbugs.gnu.org; Thu, 14 Nov 2024 14:23:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBfRV-0007S3-Lw for 74339@debbugs.gnu.org; Thu, 14 Nov 2024 14:23:50 -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 1tBfRQ-00011N-Ci; Thu, 14 Nov 2024 14:23:44 -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=aLowMLnVNXDaJZ5y9HR2YUKAwT7ZA7Jpe1mxrWC3QRY=; b=hkmpXzuLAY5s usN7U26LJ+2miHOnD5URMFnP4KTV+Du/jx16iEcZSqFs6+UrV6mnoKFtj1yUrrmixLYwcdtH1rc9f OH/ui3G72fHqlY1gvU0yClRFesRJVgcKJ3Oyo0GVv4YrrN1nbePm0q91iGQjeFaIzu5hCk63YIFir JItM4XJmsF2sUXDU7cSZmNKXH8amlXxiRH9D5703S5Vwx8uGR7z/4HVSuyLGFnzjt2R6IFURgdPK4 bfaFkI+XK98zGuo3r+34vgsnPx2JTP7lUDaK2p7y+rqr+EfN/nMiO/g2HqFdF7Od07ANrN0DQ0jYd nugcu2CL1WmHACIcvhqfog==; In-Reply-To: (message from Alan Mackenzie on Thu, 14 Nov 2024 17:45:28 +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:295360 Archived-At: > Date: Thu, 14 Nov 2024 17:45:28 +0000 > Cc: 74339@debbugs.gnu.org, monnier@iro.umontreal.ca, acm@muc.de > From: Alan Mackenzie > > Hello, Eli. > > On Thu, Nov 14, 2024 at 18:59:53 +0200, Eli Zaretskii wrote: > > > Date: Thu, 14 Nov 2024 16:20:37 +0000 > > > Cc: 74339@debbugs.gnu.org, monnier@iro.umontreal.ca, acm@muc.de > > > From: Alan Mackenzie > > [ .... ] > > > > OK. It would seem there is then no need to put entries for > > > c-mode/c-ts-mode into major-mode-remap-defaults. I don't think this > > > solution is optimal, though. Perhaps we can come up with something > > > better for Emacs 31. But let's just go with this "last loaded wins" > > > strategem for Emacs 30. > > > OK, thanks. So I guess you will soon make that change in cc-mode.el > > on the release branch? > > OK, I can manage that. > > I'll just outline a quick outline of what I see is to be done, so as to > fix any misunderstandings before starting to hack the code: > > (i) CC Mode and c-ts-mode will both keep their autoload directives. > (ii) On loading either library, all their auto-mode-alist entries will be > refreshed. By "refresh" is meant they will be removed from > auto-mode-alist (if present) and put back again at the top of that > alist. > (iii) Evaluating a mode command does not change auto-mode-alist (except > when it causes an autoload). > (iv) The manipulations of major-mode-remap-defaults by both libraries > will be removed, since they are redundant. > > Any comments? 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. 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.