[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding functionality to a minor mode
From: |
goncholden |
Subject: |
Re: Adding functionality to a minor mode |
Date: |
Mon, 07 Feb 2022 19:18:47 +0000 |
------- Original Message -------
On Monday, February 7th, 2022 at 6:05 PM, Michael Heerdegen
<michael_heerdegen@web.de> wrote:
> 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.
Am not sure whether I am executing your suggestion good. What should I look
for?
--------
Debugger entered--Lisp error: (wrong-type-argument stringp \.\.\.)
string-match("\\bARG\\b" \.\.\. nil)
easy-mmode--mode-docstring(\.\.\. "Rich minor mode" rich-minor-mode-map)
#f(compiled-function (mode doc &optional init-value lighter keymap &rest
body) #<bytecode 0x1578375e6509>)(rich-minor-mode \.\.\.)
apply(#f(compiled-function (mode doc &optional init-value lighter keymap
&rest body) #<bytecode 0x1578375e6509>) (rich-minor-mode \.\.\.))
macroexpand-1((define-minor-mode rich-minor-mode \.\.\.))
eval((macroexpand-1 '(define-minor-mode rich-minor-mode \.\.\.)) t)
eval-expression((macroexpand-1 '(define-minor-mode rich-minor-mode \.\.\.))
nil nil 127)
funcall-interactively(eval-expression (macroexpand-1 '(define-minor-mode
rich-minor-mode \.\.\.)) nil nil 127)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
- 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, 2022/02/07
- Re: Adding functionality to a minor mode,
goncholden <=
- 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
- Re: Adding functionality to a minor mode, goncholden, 2022/02/08