GNU bug report logs -
#58075
Mapping file types to major modes
Previous Next
Full log
Message #17 received at 58075 <at> debbugs.gnu.org (full text, mbox):
Hi Stefan,
>>>>> Stefan Monnier <monnier <at> 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
This bug report was last modified 2 years and 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.