From: Eli Zaretskii <eliz@gnu.org>
To: acm@muc.de, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: stefankangas@gmail.com, 74339@debbugs.gnu.org
Subject: bug#74339: 30.0.92; CC Mode stomps C TS Mode
Date: Sat, 16 Nov 2024 10:18:24 +0200 [thread overview]
Message-ID: <864j47iobz.fsf@gnu.org> (raw)
In-Reply-To: <jwv8qtjr9wu.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 16 Nov 2024 01:17:41 -0500)
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Stefan Kangas <stefankangas@gmail.com>, Eli Zaretskii <eliz@gnu.org>,
> 74339@debbugs.gnu.org
> Date: Sat, 16 Nov 2024 01:17:41 -0500
>
> > No, that is the problem. Have a look at major-mode-remap-defaults, and
> > how c-ts-mode uses it to cause the symbol `c-mode' to start c-ts-mode in
> > certain circumstances. This is what I'm unhappy about.
>
> In which way is this worse than what we have in Emacs-29 where loading
> `c-ts-mode` does things like:
>
> (add-to-list 'auto-mode-alist
> '("\\(\\.[chi]\\|\\.lex\\|\\.y\\(acc\\)?\\)\\'" . c-ts-mode))
> (add-to-list 'auto-mode-alist '("\\.x[pb]m\\'" . c-ts-mode))
>
> ?
>
> > That "somehow" is the loading of c-ts-mode. I think that even C-h f
> > c-ts-mode counts as an "explicit indication" of a supposed preference for
> > c-ts-mode, given that it loads c-ts-mode (if it actually does).
>
> Yup, and the same happens in Emacs-29.
Right. Moreover, in Emacs 29 the modification of auto-mode-alist only
took care of visiting C files without a mode cookie. In addition,
with Emacs 29, once the user loaded c-ts-mode, there was no way for
the user to go back to using C Mode; with the changes we propose to
make in cc-mode.el and c-ts-mode.el, this will be possible.
So Emacs 30 will not regress from Emacs 29, and will make the
situation at least a tad better.
> > I don't think the current mechanism is ready for the release of Emacs 30.
>
> I don't see a regression here.
Right, and so no obstacles for releasing Emacs 30, once we make the
proposed changes in cc-mode.el and in c-ts-mode.el, which rectify the
tweaking of major-mode-remap-defaults.
> > What I think we're lacking is an explicit setting or command for the
> > user to state what her preferred mode for C actually is.
Yes, and we should work on adding that. But this will not happen in
Emacs 30, especially since we don't yet have a clear idea how to do
this.
Alan, please help us release Emacs 30 sooner rather than later by
agreeing to the proposed changes in cc-mode.el and in c-ts-mode.el.
next prev parent reply other threads:[~2024-11-16 8:18 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 14:00 bug#74339: 30.0.92; CC Mode stomps C TS Mode Eli Zaretskii
2024-11-13 15:13 ` Eli Zaretskii
2024-11-13 18:58 ` Alan Mackenzie
2024-11-13 20:13 ` Eli Zaretskii
2024-11-13 22:34 ` Alan Mackenzie
2024-11-13 22:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-14 6:59 ` Eli Zaretskii
2024-11-14 9:24 ` Dmitry Gutov
2024-11-14 10:05 ` Eli Zaretskii
2024-11-16 20:54 ` Andrea Corallo
2024-11-14 15:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-14 16:29 ` Dmitry Gutov
2024-11-14 16:49 ` Eli Zaretskii
2024-11-14 17:16 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-14 19:10 ` Eli Zaretskii
2024-11-14 19:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-14 16:20 ` Alan Mackenzie
2024-11-14 16:59 ` Eli Zaretskii
2024-11-14 17:45 ` Alan Mackenzie
2024-11-14 17:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-14 19:23 ` Eli Zaretskii
2024-11-14 19:53 ` Alan Mackenzie
2024-11-14 20:21 ` Eli Zaretskii
2024-11-14 20:38 ` Alan Mackenzie
2024-11-14 21:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-14 21:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-15 8:17 ` Eli Zaretskii
2024-11-15 16:17 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-15 8:13 ` Eli Zaretskii
2024-11-15 7:33 ` Eli Zaretskii
2024-11-15 13:04 ` Alan Mackenzie
2024-11-15 14:43 ` Eli Zaretskii
2024-11-15 17:58 ` Alan Mackenzie
2024-11-15 19:01 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-15 19:46 ` Alan Mackenzie
2024-11-15 20:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-16 10:25 ` Eli Zaretskii
2024-11-16 14:03 ` Stefan Kangas
2024-11-16 14:35 ` Eli Zaretskii
2024-11-15 20:58 ` Stefan Kangas
2024-11-15 21:56 ` Alan Mackenzie
2024-11-16 3:22 ` Stefan Kangas
2024-11-16 11:45 ` Eli Zaretskii
2024-11-16 18:17 ` Alan Mackenzie
2024-11-16 6:17 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-16 8:18 ` Eli Zaretskii [this message]
[not found] ` <Zzi86KPmTv1Qb3nw@MAC.fritz.box>
[not found] ` <86ttc7f7jo.fsf@gnu.org>
2024-11-16 21:56 ` Alan Mackenzie
2024-11-17 6:31 ` Eli Zaretskii
2024-11-16 9:52 ` Eli Zaretskii
2024-11-15 18:57 ` Dmitry Gutov
2024-11-21 7:57 ` Eli Zaretskii
2024-11-14 17:29 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-14 19:20 ` Eli Zaretskii
2024-11-14 19:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-14 20:37 ` Eli Zaretskii
2024-11-14 20:58 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-14 22:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-15 12:02 ` Eli Zaretskii
2024-11-15 7:58 ` Eli Zaretskii
2024-11-15 16:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-16 20:51 ` Andrea Corallo
2024-11-13 20:28 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 20:42 ` Eli Zaretskii
2024-11-13 20:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=864j47iobz.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=74339@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=monnier@iro.umontreal.ca \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).