[Top][All Lists]

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

Re: Cancel enabling of minor-mode.

From: Stefan Monnier
Subject: Re: Cancel enabling of minor-mode.
Date: Wed, 27 Nov 2013 15:53:23 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> Can I somehow cancel enabling of my minor-mode?
> Example of what I want:

> (define-minor-mode test-mode
>     "documentation"
>     :init-value nil
>     (if test-mode
>         (if some-condition
>             cancel enabling of test-mode. exit
>           actions-when-enabling)
>       actions-when-disabling))

To cancel, you can (setq test-mode nil).


reply via email to

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