[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Smarter M-x that filters on major-mode
From: |
Robert Pluim |
Subject: |
Re: Smarter M-x that filters on major-mode |
Date: |
Fri, 12 Feb 2021 14:40:44 +0100 |
>>>>> On Fri, 12 Feb 2021 12:19:46 +0100, Lars Ingebrigtsen <larsi@gnus.org>
>>>>> said:
Lars> Robert Pluim <rpluim@gmail.com> writes:
>> 'minor-mode-list'?
Lars> Oh, I thought that was an XEmacs compat thing, since it's added by
this
Lars> function:
Lars> ---
Lars> (defun add-minor-mode (toggle name &optional keymap after toggle-fun)
Lars> "Register a new minor mode.
Lars> This is an XEmacs-compatibility function. Use `define-minor-mode'
instead.
Lars> ---
Lars> Does this doc string mean that one shouldn't use `add-minor-mode'
Lars> directly, but only through `define-minor-mode'? But that everything
Lars> that `add-minor-mode' does isn't XEmacs compat stuff?
I think that docstring is misleading: define-minor-mode calls
add-minor-mode, and thus ends up updating minor-mode-list. It would be
nice if we could rely on that.
Lars> Which could also conceivably be useful in other situations.
>>
>> If you make changes here, could you arrange for some (buffer-local?)
>> symbol somewhere to be updated when a minor mode is activated?
>> Figuring out which minor modes are in effect is currently non-trivial.
Lars> That does sound like a useful thing... Since the major mode is
Lars> determined by the `major-mode' variable, what about a new
Lars> permanently-local variable `minor-modes'? `define-minor-mode' would
be
Lars> responsible for adding/removing itself to the variable.
You mean the enable/disable function for the minor mode created by
define-minor-mode?
Robert
- Re: Smarter M-x that filters on major-mode, (continued)
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Stefan Monnier, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/12
- Re: Smarter M-x that filters on major-mode, Stefan Monnier, 2021/02/12
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/13
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/12
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/12
- Re: Smarter M-x that filters on major-mode, Robert Pluim, 2021/02/12
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/12
- Re: Smarter M-x that filters on major-mode,
Robert Pluim <=
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/13
- Re: Smarter M-x that filters on major-mode, tomas, 2021/02/11
- RE: [External] : Re: Smarter M-x that filters on major-mode, Drew Adams, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Óscar Fuentes, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Eli Zaretskii, 2021/02/11
- Re: Smarter M-x that filters on major-mode, tomas, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Jean Louis, 2021/02/12
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Basil L. Contovounesios, 2021/02/12