[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding functionality to a minor mode
From: |
Michael Heerdegen |
Subject: |
Re: Adding functionality to a minor mode |
Date: |
Mon, 07 Feb 2022 19:05:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
goncholden <goncholden@protonmail.com> writes:
> I am also struck about what happens when "(define-minor-mode
> rich-minor-mode" is used to disable the mode. I suppose that "(when
> richerenkov-minor-mode" would evaluate to false, but the other parts
> would evaluate.
Yes. Whenever you turn the mode on or off, the complete body is
evaluated normally, with the mode variable bound to a non-nil value when
the mode has been enabled and nil else.
M-: (macroexpand-1 '(define-minor-mode rich-minor-mode ...)) RET to see
the macroexpanded code of your definition - helps in understanding.
Michael.
- Adding functionality to a minor mode, goncholden, 2022/02/05
- Re: Adding functionality to a minor mode, goncholden, 2022/02/05
- Re: Adding functionality to a minor mode, goncholden, 2022/02/06
- Re: Adding functionality to a minor mode, Eric Abrahamsen, 2022/02/07
- Re: Adding functionality to a minor mode, goncholden, 2022/02/07
- Re: Adding functionality to a minor mode,
Michael Heerdegen <=
- Re: Adding functionality to a minor mode, goncholden, 2022/02/07
- RE: [External] : Re: Adding functionality to a minor mode, Drew Adams, 2022/02/07
- RE: [External] : Re: Adding functionality to a minor mode, goncholden, 2022/02/07
- RE: [External] : Re: Adding functionality to a minor mode, Drew Adams, 2022/02/07
- Re: Adding functionality to a minor mode, Michael Heerdegen, 2022/02/07
- Re: Adding functionality to a minor mode, goncholden, 2022/02/07
- Re: Adding functionality to a minor mode, Michael Heerdegen, 2022/02/07
- Re: Adding functionality to a minor mode, Kevin Vigouroux, 2022/02/08
- Re: Adding functionality to a minor mode, Stefan Monnier, 2022/02/08
- Re: Adding functionality to a minor mode, goncholden, 2022/02/08