[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unload-feature questions and thoughts
From: |
Juanma Barranquero |
Subject: |
Re: unload-feature questions and thoughts |
Date: |
Wed, 10 Oct 2007 18:08:59 +0200 |
On 10/10/07, Davis Herring <address@hidden> wrote:
> I'm glad to contribute a native speaker's touch, but I'm afraid that I
> don't see what's wrong with it. Looking at the code, it does seem that it
> invokes that hook ("fortran-unload-hook" for (unload-feature 'fortran)) if
> it exists, or else goes hunting for non-autoloaded functions defined by
> the package that are on -hook/etc. variables or on `auto-mode-alist'. Am
> I misreading the same way that you have done?
Apparently, you're not misreading the docstring.
Each time I read this bit:
Packages may define a hook FEATURE-unload-hook that is called
instead of the normal heuristics for doing this. Such a hook should
undo all the relevant global state changes that may have been made by
loading the package or executing functions in it.
I interpret it as if "all the relevant global state changes" refers
not just to hooks and `auto-mode-alist' (which is not mentioned in the
docstring), but to all other things that `unload-feature' does, i.e.:
killing local values of variables, f?makeunbound'ing symbols,
restoring autoloads, etc.
In other words, these sentences always make me think that either you
use `FEATURE-unload-hook' and do all the work, or you don't use it and
let `unload-feature' work its magic. Now, I *know* that's not what it
says; it's just what I read :(
In the previous discussion, David Kastrup said:
I seem to remember that I actually had to read the code before
getting the right idea about what FEATURE-unload-hook does.
and afterwards:
Maybe "the normal heuristics" and "all the relevant global state
changes" are far too much hand-waving: readers will probably
phantasize whatever they would think useful into it.
I think these quotes summarize the problem nicely.
Juanma
- Re: unload-feature questions and thoughts, Juanma Barranquero, 2007/10/10
- Re: unload-feature questions and thoughts, Davis Herring, 2007/10/10
- Re: unload-feature questions and thoughts,
Juanma Barranquero <=
- Re: unload-feature questions and thoughts, Davis Herring, 2007/10/10
- Re: unload-feature questions and thoughts, Juanma Barranquero, 2007/10/10
- Re: unload-feature questions and thoughts, Davis Herring, 2007/10/10
- Re: unload-feature questions and thoughts, Richard Stallman, 2007/10/11
- Re: unload-feature questions and thoughts, David Kastrup, 2007/10/11
- Re: unload-feature questions and thoughts, Juanma Barranquero, 2007/10/11
- Re: unload-feature questions and thoughts, Richard Stallman, 2007/10/12
- Re: unload-feature questions and thoughts, Juanma Barranquero, 2007/10/12
- Re: unload-feature questions and thoughts, Richard Stallman, 2007/10/13
- Re: unload-feature questions and thoughts, Juanma Barranquero, 2007/10/13