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

From: Kevin Ryde <[email-masked]>
Date: Wed, 06 Jan 2010 10:31:19 +1100

To, umm, get slightly back on-topic -- as an alternative for unloading
minor modes, if the mode is currently enabled in a buffer, or enabled
globally for a global, then unload-feature might refuse to unload
(except under FORCE) on that basis that in-use is a kind of dependency
on the feature's code etc.  The same might be applied to major modes,
ie. refuse to unload if in use.

Some generality could be had if there was a way that define-minor-mode
might tie-in a test that unload-feature would reach when considering
whether to unload.  define-minor-mode might like to run some code on the
actual unload too, to reverse some of `add-minor-mode', like removing
from minor-mode-list (unless perhaps autoloaded minor mode funcs could
stay there happily enough).