unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Basil L. Contovounesios" <basil@contovou.net>
Cc: 69191@debbugs.gnu.org
Subject: bug#69191: 30.0.50; New var `major-mode-remap-defaults`, for packages
Date: Sun, 03 Mar 2024 23:25:27 -0500	[thread overview]
Message-ID: <jwvedcqaaq3.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <875xyiext7.fsf@epfl.ch> (Basil L. Contovounesios's message of "Wed, 21 Feb 2024 14:44:52 +0100")

>> 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.

>> +  (let ((mode
>> +         (if (save-excursion
>> +               (save-restriction
>> +                 (save-match-data       ; Why `save-match-data'?
>> +                   (widen)
>> +                   (goto-char (point-min))
>> +                   (re-search-forward c-ts-mode--c-or-c++-regexp nil t))))
>> +             'c++-ts-mode)
>> +         'c-ts-mode))
> I'm excited for this new let-syntax to catch on, but maybe as a separate
> feature request.

You think you're funny. eh?

>> -;;;###autoload (defalias 'TeX-mode #'tex-mode)
>> -;;;###autoload (defalias 'plain-TeX-mode #'plain-tex-mode)
>> -;;;###autoload (defalias 'LaTeX-mode #'latex-mode)
>> +;;;###autoload (add-to-list 'major-mode-remap-defaults '(TeX-mode . tex-mode))
>> +;;;###autoload (add-to-list 'major-mode-remap-defaults '(plain-TeX-mode . plain-tex-mode))
>> +;;;###autoload (add-to-list 'major-mode-remap-defaults '(LaTeX-mode . latex-mode))
>
> Can we really afford to lose the aliases in loaddefs.el?
> There are at least a few in-tree uses of the AUCTeX names.

Oops, indeed.  Hmm... too bad, it means we still have to keep those
aliases a while longer.


        Stefan






  reply	other threads:[~2024-03-04  4:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 15:45 bug#69191: 30.0.50; New var `major-mode-remap-defaults`, for packages Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-21 13:44 ` Basil L. Contovounesios
2024-03-04  4:25   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-03-04  4:59     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-06  0:03     ` Dmitry Gutov
2024-03-06  2:54       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-06 23:15         ` Dmitry Gutov
2024-03-07  3:39           ` 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=jwvedcqaaq3.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=69191@debbugs.gnu.org \
    --cc=basil@contovou.net \
    --cc=monnier@iro.umontreal.ca \
    /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).