Subject: Re: bug#5294: 23.1; unload-feature disable minor-mode

From: Juanma Barranquero <[email-masked]>
Date: Mon, 4 Jan 2010 00:12:55 +0100

On Mon, Jan 4, 2010 at 00:04, Kevin Ryde <[email-masked]> wrote:

> Though I wonder that an add-on might want to slip in
> after the FOO-unload-function has reported whether the "normal" unload
> actions should be performed.

You can use an around advice, and have almost complete control.

> Mind you, I wonder if unload-feature is slightly doomed in general,
> ie. unless a given package has thought rather carefully about the
> consequences!  :-)

Well, certainly unloading can have consequences; that's why I insist
that the best place to define what should do for any package is in the
package itself. Even an add-on to a package should just define its own
feature, and FOO-unload-function for itself, IMO. If you don't use the
FORCE argument, a package cannot be unloaded before unloading its
dependencies, so it is safe to unload the add-ons before.

    Juanma