[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 760910f: Add a new buffer-local variable `minor-modes'
From: |
Stefan Monnier |
Subject: |
Re: master 760910f: Add a new buffer-local variable `minor-modes' |
Date: |
Sun, 14 Feb 2021 10:34:51 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> Add a new buffer-local variable `minor-modes'
>
> * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Keep
> `minor-modes' updated.
Hmm... those files that have already been compiled with earlier Emacsen
will not keep this var up-to-date, so it can't be used reliably.
Also, I wonder why we need this to be a variable.
Can't we have an `enabled-minor-modes` function instead, which can simply
loop through `minor-mode-list` and see which ones are enabled?
> + ;; Keep `minor-modes' up to date.
> + (setq minor-modes (delq ',modefun minor-modes))
> + (when ,getter
> + (push ',modefun minor-modes))
For global minor modes, this will adjust the list for the buffer that
happens to be current when the mode is changed, but it won't affect all
other buffers's lists.
Stefan
- Re: master 760910f: Add a new buffer-local variable `minor-modes', Basil L. Contovounesios, 2021/02/14
- Re: master 760910f: Add a new buffer-local variable `minor-modes',
Stefan Monnier <=
- Re: master 760910f: Add a new buffer-local variable `minor-modes', Lars Ingebrigtsen, 2021/02/14
- Re: master 760910f: Add a new buffer-local variable `minor-modes', Lars Ingebrigtsen, 2021/02/14
- Re: master 760910f: Add a new buffer-local variable `minor-modes', Stefan Monnier, 2021/02/14
- Re: master 760910f: Add a new buffer-local variable `minor-modes', Lars Ingebrigtsen, 2021/02/14
- Re: master 760910f: Add a new buffer-local variable `minor-modes', Stefan Monnier, 2021/02/14
- Re: master 760910f: Add a new buffer-local variable `minor-modes', Lars Ingebrigtsen, 2021/02/14