bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Juanma Barranquero
Subject: bug#5294: 23.1; unload-feature disable minor-mode
Date: Wed, 6 Jan 2010 02:09:10 +0100

On Wed, Jan 6, 2010 at 02:01, Kevin Ryde <user42@zip.com.au> wrote:

> Principally that define-minor-mode knows what things it did and
> therefore should be undone, or why they might not be undone at the
> present time.

But that is defined in the same file as the unload-function...

> I think it would be rather repetitive to be obliged to
> write a FOO-unload-function whenever making a minor mode.

You want to write the same code, but put it in define-minor-mode. I
don't think define-minor-mode should worry itself with unloading.

> Which, err, presumes that there may be standardized things that should
> be considered and/or undone for unloading a mode.  I see you say there's
> normally not -- where I say there could be a disable or a caution to
> avoid likely breakage, removal from the minor modes menu, etc.

I do not say that there are not, I say that they are not easy to
generalize. Some are. For example, removing a minor-mode for the
minor-modes menu seems a good idea, and should be done by
unload-feature if it is not done already, because calling a
nonexistent function is an error.

    Juanma






reply via email to

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