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: Lute Kamstra
Subject: Re: Removing unloaded functions from auto-mode-alist.
Date: Wed, 20 Apr 2005 21:22:13 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

[...]

>>> Won't work.  Autoloads corresponding to a different file than the
>>> loaded one don't get restored.
>>
>> That's a bug which we should fix.
>
> I am not sure it is a bug.  If I load several packages redefining one
> symbol, and then unload _one_ of those packages, is it a good idea if
> the symbol gets restored to an autoload?

To be sure we're talking about the same thing: The problem is not that
"autoloads corresponding to a different file than the loaded one don't
get restored."  The problem is that loading a file (either by means of
load or by means of require) doesn't record the old autoloads.

Consider this case: apropos is autoloaded; something does (require
'apropos) and apropos.el gets loaded without recording the autoload;
you do (unload-feature 'apropos); apropos is now not bound as a
function.

>> In the mean time, you can use an auctex-override-unload-hook to
>> re-install the autoloads.
>
> This hook is not available in XEmacs or in Emacs 21.3.  And the normal
> auctex-unload-hook is getting run before symbols are fmakunbound, so
> can't restore the autoloads permanently.

FEATURE-unload-hook is called by (unload-feature FEATURE).  It is used
in Emacs since version 20.4.  You can use it to restore autoloads by
setting the autoload property of function symbols.  But you're using
undocumented inside knowledge in that case.

Lute.




reply via email to

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