[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Experimentally unbind M-o on the trunk
From: |
Lars Ingebrigtsen |
Subject: |
Re: Experimentally unbind M-o on the trunk |
Date: |
Wed, 10 Feb 2021 20:16:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Matt Armstrong <matt@rfc20.org> writes:
> What if instead help showed all the interactive commands provided by
> the mode? What if M-x were smarter about highlighting mode specific
> commands?
It's been discussed before -- somebody just has to implement one of the
various possibilities here. The problem is that commands are only tied
very loosely to modes:
(defun foo-thing ()
(interactive)
...)
will make `M-x fTAB' show `foo-thing' even if it's useless outside of
all other modes than `foo-mode'. Conversely, `C-h m' in `foo-mode'
won't, as you mention, list `foo-thing' unless there's a binding for it.
My suggestion is to introduce a new form:
(defun foo-thing ()
(command foo-mode)
...)
This would be just like `interactive', but will do the right thing in
`M-x fTAB' and `C-h m' in modes derived from `foo-mode'. (It could also
be a list of mode, of course, but that'd be more rare, is my guess.)
A
(declare (mode foo-mode))
form would also work, but it's a bit more verbose and noisy.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Re: Experimentally unbind M-o on the trunk, (continued)
- Re: Experimentally unbind M-o on the trunk, Alan Mackenzie, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Eli Zaretskii, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, andrés ramírez, 2021/02/10
- RE: [External] : Re: Experimentally unbind M-o on the trunk, Drew Adams, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Jean Louis, 2021/02/11
- Re: Experimentally unbind M-o on the trunk, Matt Armstrong, 2021/02/10
- Re: Experimentally unbind M-o on the trunk,
Lars Ingebrigtsen <=
- Smarter M-x that filters on major-mode, Stefan Kangas, 2021/02/10
- Re: Smarter M-x that filters on major-mode, Stefan Monnier, 2021/02/10
- Re: Smarter M-x that filters on major-mode, Yuan Fu, 2021/02/11
- RE: [External] : Re: Smarter M-x that filters on major-mode, Drew Adams, 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, 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, Lars Ingebrigtsen, 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, Lars Ingebrigtsen, 2021/02/11