unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ikumi Keita <ikumi@ikumi.que.jp>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 58075@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
Subject: bug#58075: Mapping file types to major modes
Date: Wed, 28 Sep 2022 17:15:43 +0900	[thread overview]
Message-ID: <69055.1664352943@localhost> (raw)
In-Reply-To: <jwvpmfjiicb.fsf-monnier+emacs@gnu.org>

Hi Stefan,

>>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> So instead I suggest consider the current settings as being our
> implementation of (A), and add (B) as some "mode remapping" layer to
> decide which major mode to actually for a given "type/mode".
> So instead of

>     (defalias 'perl-mode #'cperl-mode)

> We could have

>     (add-to-list 'major-mode-remap-alist '(perl-mode . cperl-mode))

In your proposed patch, `major-mode-remap-alist' is a user option
defined by `defcustom'.

Is it supposed to be legitimate that a site administrator sets up the
default mapping for the site as
>     (add-to-list 'major-mode-remap-alist '(perl-mode . cperl-mode))
in site-start.el?

Currently, a site admin can place AUCTeX activation code
     (load "auctex.el" nil t t)
in site-start.el to prepare AUCTeX to be the site-wide default TeX mode.
In auctex.el, (require 'tex-site) loads tex-site.el, which adds the
:override advice for `latex-mode' etc. An individual user in that site
who prefer built-in modes can get rid of AUCTeX by
     (unload-feature 'tex-site)
in the user init file. That's the way that AUCTeX satisfy the preference
of both site admins and individual users.

I briefly skimmed over info documents of Emacs and Elisp, but could not
find a description whether a site admin is allowed or not to alter the
value of user customize variable in site-start.el (not default.el, of
course).

If it isn't allowed, I'd request to turn defcustom into defconst (or a
similar facility for site admin to set up the site default mapping
between (A) and (B)) so that AUCTeX can continue to satisfy both site
admins and users without :override advice hack.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine





  parent reply	other threads:[~2022-09-28  8:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 15:38 bug#58075: Mapping file types to major modes Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-26 11:26 ` Lars Ingebrigtsen
2022-09-26 12:13   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-27 12:54     ` Lars Ingebrigtsen
2022-10-03 15:18       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-03 15:18       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-28  8:15 ` Ikumi Keita [this message]
2022-09-28 17:29   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-29  4:58     ` Ikumi Keita
2022-09-29 12:18       ` 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=69055.1664352943@localhost \
    --to=ikumi@ikumi.que.jp \
    --cc=58075@debbugs.gnu.org \
    --cc=juri@linkov.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).