Subject: Re: bug#74339: 30.0.92; CC Mode stomps C TS Mode

From: Christopher Dimech <[email-masked]>
Date: Sun, 24 Nov 2024 17:01:25 +0100

> Sent: Monday, November 25, 2024 at 3:37 AM
> From: "Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email-masked]>
> To: "Eli Zaretskii" <[email-masked]>
> Cc: [email-masked], [email-masked]
> Subject: bug#74339: 30.0.92; CC Mode stomps C TS Mode
>
> > Like the patch below.  Is it okay?
> [...]
> > +(setq major-mode-remap-defaults
> > +      (assq-delete-all 'ruby-mode major-mode-remap-defaults))
> > +
>
> So, this adds `ruby-mode.el` and `ruby-ts-mode.el` to the list of files
> which break our coding convention that loading a file should not affect
> Emacs's behavior.
>
> I understand we decided back in Emacs-29 that it was the least bad
> solution to make it easy for users to use the new TS major modes, but
> this was back in Emacs-29.  We should look for ways to remove this kind
> of hack rather than spreading it to more files.
> - Stefan

Temporary solutions, such as hacks, must be explicitly marked as such
and accompanied by plans for their eventual removal. Failure to do so
perpetuates confusion among Elisp developers regarding the appropriate
structures to use.