From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: acm@muc.de, 74367@debbugs.gnu.org, stefankangas@gmail.com
Subject: bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes
Date: Sat, 16 Nov 2024 23:00:09 +0200 [thread overview]
Message-ID: <86serqx5ba.fsf@gnu.org> (raw)
In-Reply-To: <jwv34jrkkbk.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 16 Nov 2024 15:26:31 -0500)
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: stefankangas@gmail.com, 74367@debbugs.gnu.org, acm@muc.de
> Date: Sat, 16 Nov 2024 15:26:31 -0500
>
> >> I don't understand why you insist on suggesting such a "setting" since
> >> it's unreliable now and probably even more so in the future.
> > Because that's what users did in Emacs 29. I don't want us to make an
> > impression it no longer works.
>
> In Emacs-29, it did work, because it modified `auto-mode-alist` and
> CC-mode never modified it back.
>
> In `emacs-30`, it doesn't work reliably any more because loading
> `cc-mode.el` after `c-ts-mode.el` causes the default mode to revert to
> `c-mode`. Loading `cc-mode.el` happens when you do `C-h f c-mode RET`,
> or when you load a file that requires it, e.g.:
This will be better once we fix the major-mode-remap-defaults are
handled by the modes involved in this. But yes, the effect of your
introduction of major-mode-remap-defaults and the subsequent changes
in cc-mode is that loading the mode works less reliably now. Which is
why the advice to use major-mode-remap-alist should now be the first
one.
> lisp/cedet/semantic/bovine/c.el:(eval-when-compile (require 'cc-mode))
> lisp/generic-x.el:(require 'cc-mode)
> lisp/org/ob-C.el:(require 'cc-mode)
> lisp/org/ob-fortran.el:(require 'cc-mode)
> lisp/progmodes/antlr-mode.el:(require 'cc-mode)
> lisp/progmodes/cc-mode.el:;; (require 'cc-mode)
> lisp/progmodes/cmacexp.el:(require 'cc-mode)
> lisp/progmodes/csharp-mode.el:(require 'cc-mode)
> lisp/progmodes/cwarn.el:(require 'cc-mode)
> lisp/progmodes/hideif.el:(require 'cc-mode)
> lisp/progmodes/js.el:(require 'cc-mode)
See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74339#38
> Also we're discussing changing `c-ts-mode.el` so loading it doesn't have
> that effect at all
That's not the change I am discussing in bug#74339.
> which means that there's a good chance it will work even less well
> in the future. So to me it's clear that suggesting the use of
> `require` or `load` to change the default C mode is doing a
> disservice to our users.
Noted.
next prev parent reply other threads:[~2024-11-16 21:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 16:45 bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-15 21:15 ` Stefan Kangas
2024-11-16 10:59 ` Eli Zaretskii
2024-11-16 16:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-16 18:35 ` Eli Zaretskii
2024-11-16 20:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-16 21:00 ` Eli Zaretskii [this message]
2024-11-17 22:19 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-18 12:09 ` Eli Zaretskii
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=86serqx5ba.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=74367@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).