[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#74339: 30.0.92; CC Mode stomps C TS Mode
From: |
Stefan Monnier |
Subject: |
bug#74339: 30.0.92; CC Mode stomps C TS Mode |
Date: |
Wed, 13 Nov 2024 17:57:55 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> When the user expresses her desire to use c-ts-mode, Emacs arranges for
>> C files to use c-ts-mode. That's what users expect from Emacs when
>> they express their preferences.
> Yes, and if the said user wants to go back to C Mode, she should be able
> to. Before my patch this was difficult.
It was (and still is) a small matter of configuring `major-mode-remap-alist`.
> Anybody wishing to use c-ts-mode can use it, by use of the symbol
> `c-ts-mode'.
In order to work on all C files, this is done by ... configuring
`major-mode-remap-alist`.
Not sure why you say one of them is "difficult" but not the other.
>> The symbol was not misused. The implementation of the user's
>> preference to use c-ts-mode was via major-mode remapping, that's all.
> The user expressing preference by setting major-mode-remap-alist was
> unaffected by my patch.
Indeed, and I think we should help the users add such a setting rather
than have them depend on unreliable defaults which depend on which file
is loaded or not or when.
> When the user wants c-ts-mode she should be able to use the symbol
> `c-ts-mode', somehow. Likewise for C Mode and `c-mode'. If some user
> adds an entry to auto-mode-alist with `c-mode' in its cdr, do you really
> think it correct to start c-ts-mode? Because that was the state of Emacs
> -Q before my patch.
Really? I find that hard to believe when reading the code.
AFAICT, in `emacs -Q` `major-mode-remap-defaults` is:
((LaTeX-mode . latex-mode) (plain-TeX-mode . plain-tex-mode)
(TeX-mode . tex-mode))
and `auto-mode-alist` maps `.c` files to `c-mode` so I can't see how and
why a C file would be put into `c-ts-mode` without some explicit action
on the part of the user.
> Don't you agree something needs to be fixed, there?
I agree what you describe would be a bug, but I think there's something
missing in your description.
[ Sorry, that's all for now, I didn't have time yet to finish your message. ]
Stefan
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Eli Zaretskii, 2024/11/13
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Eli Zaretskii, 2024/11/13
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Alan Mackenzie, 2024/11/13
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Eli Zaretskii, 2024/11/13
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Alan Mackenzie, 2024/11/13
- bug#74339: 30.0.92; CC Mode stomps C TS Mode,
Stefan Monnier <=
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Eli Zaretskii, 2024/11/14
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Dmitry Gutov, 2024/11/14
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Eli Zaretskii, 2024/11/14
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Andrea Corallo, 2024/11/16
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Stefan Monnier, 2024/11/14
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Dmitry Gutov, 2024/11/14
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Eli Zaretskii, 2024/11/14
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Stefan Monnier, 2024/11/14
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Eli Zaretskii, 2024/11/14
- bug#74339: 30.0.92; CC Mode stomps C TS Mode, Stefan Monnier, 2024/11/14