Subject: bug#69191: 30.0.50; New var `major-mode-remap-defaults`, for packages

From: Dmitry Gutov <[email-masked]>
Date: Wed, 6 Mar 2024 02:03:46 +0200

On 04/03/2024 06:25, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
>>> There are some FIXMEs that one might want to address, most importantly
>>> whether we should use an indirection through `major-mode-remap-defaults`
>>> for all TS modes or only for those for which we provide a non-TS mode.
>> My gut says: we shouldn't add out-of-tree modes (e.g. go-mode) to
>> auto-mode-alist (they should and already do that themselves); and so
>> long as TS modes are viewed as an optional alternative, then they should
>> be responsible for setting up major-mode-remap-defaults (so it should be
>> a no-op if they remap from an out-of-tree mode that is not installed).
> I like the idea of using `go-mode` as the canonical mode, even if we
> don't provide it.  But I left this part unchanged for now.

The idea seems attractive, but what's going to happen in such a 
configuration when go-ts-mode.el hasn't been loaded yet, and go-mode is 
(without additional effort by the user) is not installed?

Just an error like

   File mode specification error: (void-function go-mode)

, right?

I guess it's a bit more meaningful than silently visiting .go files in 
fundamental-mode, but is that meaningful enough?