emacs-devel
[Top][All Lists]
Advanced

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

Re: unload-feature questions and thoughts


From: Davis Herring
Subject: Re: unload-feature questions and thoughts
Date: Thu, 11 Oct 2007 09:41:21 -0700 (PDT)
User-agent: SquirrelMail/1.4.8-6.el3.2lanl

>> So I think that the evidence is for the intuitively obvious
>> statement that no one knows how to use the hook.  I found no
>> examples where the normal heuristics would break anything, although
>> neither did I find any examples where the unload-hook actually broke
>> things by suppressing the "normal heuristics".  So I think treating
>> it as a bug is probably the right thing to do for simplicity: just
>> do the heuristics regardless, and let the rare hooks that really
>> need to suppress them kill the variable bound for that purpose.
>
> Have you checked AUCTeX's loadup/startup sequence?  It uses the unload
> hooks in order to offer a way of selectively disabling autoloaded
> parts.  While the "no one knows" is somewhat accurate (it was a
> combination of reverse engineering and trial and error to make me
> understand the implications), it is likely not true that nothing will
> break by changes in that area where external packages are concerned.

First, a correction to my message and in particular the summary you
quoted: delsel.el did break things with its unload-hook, since (at least
in the current buffer) it would otherwise have had its pre-command-hook
entry removed, but as it stands that will just error out immediately after
the unload.  (From this I note that buffers should be swept for local hook
values as well as local variable values.)

Second, I just looked at the one "unload-hook" I found (in
tex-site.el.in), and it seems to just be manipulating `after-load-alist'
(though it forgets to setq it at the end) and `load-path'.  So it too
would benefit from having the normal heuristics applied (in case the user
put random AUCTeX functions on hooks).  Am I missing something?

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

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