[Top][All Lists]

[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:43:13 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

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

To put a bit more perspective on this: they serve no purpose within
Emacs or tex-mode.el, are referenced nowhere and documented nowhere.

The only conceivable way they could be called unwittingly by a user is
if a TeX file from somebody else contained a "mode: TeX" or "mode:
LaTeX" specification.  However, not even this case applies since mode
specs in local variables are downcased before use.

Now it also is the case that all the prefixes for variables and
functions in tex-mode.el are lowercase.

In contrast, all of the prefixes for variables and functions in AUCTeX
are mixed case.  This is especially true for hook variables and
everything else pertaining to modes, with the sole exception of the
setting of major-mode itself (which is indicated by lower case mode

I have grepped through the Emacs tree right now for "TeX-".  The only
locations where it is found is when there is an explicit reference to
AUCTeX functions, and in the doc string for "define-derived-mode"
which is, in my opinion, misguided at least.

Then there some occurences in add-log-tex-like-modes that allow
major-mode to be "LaTeX-mode" or "TeX-mode", presumably because they
want to accommodate AUCTeX.  AUCTeX itself never sets major-mode to a
mixed spelled symbol, so this courtesy is, while appreciated, wasted.

The only unavoidable symbol clashes that exist are the major mode
invocation functions: obviously the user has to make the choice
whether he prefers AUCTeX or tex-mode for editing TeX and LaTeX files,
and this preference has to be reflected in the meaning of tex-mode and
latex-mode, since those are what gets invoked for TeX and LaTeX

Now while the conflicts for tex-mode and latex-mode are a necessary
consequence of AUCTeX being an alternative implementation of TeX
modes, there is no fathomable reason to have this conflict for
TeX-mode and LaTeX-mode as well.  All of the hook variables and
internals of AUCTeX are carefully designed to work with _those_
spellings in order to allow a parallel installation with tex-mode.el,
and there really is no conceivable reason I can see for the aliases in

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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