[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About the activation of minor modes
From: |
Eduardo Ochs |
Subject: |
Re: About the activation of minor modes |
Date: |
Sun, 6 Mar 2022 00:06:55 -0300 |
On Fri, 4 Mar 2022 at 23:48, angelomolina--- via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Can a minor mode activate another minor-mode or functionalities residing in
> other files ? I ask because I would like my tools to be organised according
> to some categorisation criteria' rather than all being huddled together.
Hi Angelo,
I don't know if this idea will help or not, but this is how I would
try to find the answer...
The function `find-epp' of eev pretty-prints its argument and shows
the result in a temporary buffer, and this
(find-epp (macroexpand '
(define-minor-mode A-mode
"Help for A-mode"
:init-value nil
:global nil
:lighter " A")
))
shows exactly what this `define-minor-mode' does. I _guess_ that it
should be easy to modify the (define-minor-mode A-mode ...) sexp bit
by bit until you get something that turns on and off B-mode when
A-mode is turned on and off - and if you use
:lighter " B"
in your definition of B-mode then you'll be able to check if B mode
was turned on and off by just looking at the mode line.
Some people like to learn things using this approach and some hate it.
For more info on that, see:
http://angg.twu.net/find-elisp-intro.html
and for more (basic) info on eev, see:
http://angg.twu.net/2020-list-packages-eev-nav.html
Cheers and happy hacking =),
Eduardo Ochs
http://angg.twu.net/#eev
- Re: About the activation of minor modes, (continued)
- Re: About the activation of minor modes, Emanuel Berg, 2022/03/05
- Re: About the activation of minor modes, angelomolina, 2022/03/05
- Re: About the activation of minor modes, Emanuel Berg, 2022/03/05
- Re: About the activation of minor modes, Emanuel Berg, 2022/03/05
- Re: About the activation of minor modes, angelomolina, 2022/03/07
- Re: About the activation of minor modes, Emanuel Berg, 2022/03/08
- Re: About the activation of minor modes, angelomolina, 2022/03/08
- Re: About the activation of minor modes, Emanuel Berg, 2022/03/08
- Re: About the activation of minor modes, angelomolina, 2022/03/09
- Re: About the activation of minor modes, angelomolina, 2022/03/09
Re: About the activation of minor modes,
Eduardo Ochs <=