GNU bug report logs -
#74339
30.0.92; CC Mode stomps C TS Mode
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Wed, 13 Nov 2024 14:02:02 UTC
Severity: normal
Found in version 30.0.92
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #74 received at 74339 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 14 Nov 2024 17:45:28 +0000
> Cc: 74339 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, acm <at> muc.de
> From: Alan Mackenzie <acm <at> muc.de>
>
> 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 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, acm <at> muc.de
> > > From: Alan Mackenzie <acm <at> muc.de>
>
> [ .... ]
>
> > > 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.
This bug report was last modified 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.