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: Stefan Monnier
Subject: Re: Removing unloaded functions from auto-mode-alist.
Date: Wed, 20 Apr 2005 16:57:59 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> I of course understand why it would override them, but not why it
>> would set major-mode to `latex-mode' rather than to `LaTeX-mode'.
>> 
>> In my opinion, LaTeX-mode is the AUCTeX major mode, while latex-mode
>> can be either, depending on the user's preference.

> You are confusing the value of the major-mode variable with the
> invocation.

No such confusion: I'm quite aware of the difference.  I may be
misrepresenting things because looking at the current auctex CVS code
I can't see where LaTeX-mode is defined.

The variable `major-mode' *should* hold the function corresponding to this
invocation, so you can return to the current major mode by calling it.
It's used for C-h m for example, and probably by other things
(e.g. clone-buffer, maybe mmm-mode, some hacks to "temporarily switch major
mode", ...).

> The invocation "LaTeX-mode" installs latex-mode with
> AUCTeX keybindings, syntax tables, mode hooks and variables.

In my opinion, calling LaTeX-mode should install LaTeX-mode.
Calling latex-mode might either install latex-mode or LaTeX-mode depending
on the user's preference.

>> Indeed, as shown in my sample auctex-override.el you just have to
>> explicitly fmakunbound them before setting up the autoload.  No
>> biggie, tho.

> Except that it makes it harder to have unload-feature restore the
> state previous to the loading.

Yes, but you can't rely on unload-feature restoring the previous state
anyway because it's broken, so it's not like it makes things worse.


        Stefan




reply via email to

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