emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing unloaded functions from auto-mode-alist.


From: David Kastrup
Subject: Re: Removing unloaded functions from auto-mode-alist.
Date: Wed, 20 Apr 2005 17:57:04 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>     Any objection to removing those aliases?
>>     These names belong to AUCTeX and are just wrong in tex-mode.el.
>
>> I don't see any reason to consider them "wrong", or to think they
>> "belong" to anything other than tex-mode.el.
>
> - tex-mode.el uses the "tex-" and "latex-" prefix for all its functions
>   and variables.
>
> - AUCTeX uses the "TeX-" and "LaTeX-" (and a few more) prefixes for all its
>   functions and variables.
>
> I think the above is a good reason why "TeX-mode" and "LaTeX-mode" belong to
> AUCTeX rather than to tex-mode.el.
>
> So I think it's wrong for tex-mode.el to define
> (defalias 'TeX-mode 'tex-mode) unless it explicitly intends to override the
> AUCTeX definition.

Which would be pretty pointless, since TeX-mode is never explicitly
called by auto-mode-alist or mode specifications in files (which get
downcased before getting applied), not even when AUCTeX is active.

Indeed, AUCTeX's own TeX-mode function (which can recognize more
formats than tex-mode.el) then calls plain-tex-mode, latex-mode,
context-mode and so on based on its decision, so that the user's
preference for tex-mode.el or AUCTeX can be decided by assigning the
proper meaning to those function names, and those names only.

Where a mode in AUCTeX is required functionally instead of as a user
preference, again the mixed case variants are used.  ConTeXt-mode, for
example, is derived from plain-TeX-mode.

The whole separation has been maintained rather meticulously.  For
historical reasons AUCTeX will need to override the mixed mode aliases
in tex-mode.el, so there are no purely technical reasons that would
require removing them.  But I think that their presence in tex-mode.el
is not a good idea since it encourages unsuspecting users to do things
that will cause undesirable results when AUCTeX is installed in
parallel.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]