GNU bug report logs -
#5294
23.1; unload-feature disable minor-mode
Previous Next
Reported by: Kevin Ryde <user42 <at> zip.com.au>
Date: Sat, 2 Jan 2010 21:10:03 UTC
Severity: minor
Tags: wontfix
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Sun, Jan 3, 2010 at 00:58, Kevin Ryde <user42 <at> zip.com.au> wrote:
> It seems unlikely a minor mode can do anything much good when its
> functions have been unloaded. Some "static" effects might be ok,
That is the point. The writer of the mode knows better. I'm not saying
that you're not right in this, only that there could be downsides.
>> FOO-unload-hook is
>
> ... a flexible way for unrelated libraries, macros or bits of code to
> undo things they know about, even different conditionalized parts of one
> .el like in tramp-util.el.
Yeah, well, that and also, it never really worked. You seem to think
that FOO-unload-hook is a hook run while executing `unload-feature'.
In fact, is a hook run *instead* of some other code. The very act of
defining FOO-unload-hook has unexpected consequences: `unlead-feature'
won't remove FOO functions from hooks, nor from `auto-mode-alist'. And
it was always so; that's why I pushed for introducing
FOO-unload-function.
> A kind of inverse to eval-after-load,
> difficult to arrange on a monolithic unload func.
In general, a package is the place where the knowledge about its
unloading should be concentrated, IMO. If you want to piggyback onto
it, there are several ways, like advising FOO-unload-function, if it
is defined, or `unload-feature', etc. There's nothing "difficult to
arrange".
If you want to have an inverse to eval-after-load, I'd suggest you
propose a new hook, unload-feature-functions (not FOO-specific).
Juanma
This bug report was last modified 3 years and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.