[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Smarter M-x that filters on major-mode
From: |
Lars Ingebrigtsen |
Subject: |
Re: Smarter M-x that filters on major-mode |
Date: |
Sat, 13 Feb 2021 12:22:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
jao <jao@gnu.org> writes:
> it's perhaps more tricky, but it could also be
>
> (interactive 'c-mode)
>
> which is distinguisable from a string or a form:
>
> (interactive "p")
> (interactive (list a b))
>
> i.e., one adopts the convention that if the argument's value is a
> symbol, it denotes a mode. personally, i would like that option even
> better, but i'd understand people might consider it a bit brittle.
Hm... It's possible, but it seems a bit hacky, I think.
I'm trying to remember why I came up with the `command' thing instead of
`interactive' the last time this was discussed, but I haven't found
it... it's possible (back then) that I somehow imagined that
`interactive' took a &rest instead of an &optional, and that would make
it necessary to introduce a new form.
But that's wrong, obviously, so I think I'll just rework this stuff to
use `interactive', so it'll be
(interactive nil foo-mode bar-mode)
all over the place instead of
(command (foo-mode bar-mode))
That is, I think you're right that introducing a new form here doesn't
help much.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- RE: [External] : Re: Smarter M-x that filters on major-mode, (continued)
- RE: [External] : Re: Smarter M-x that filters on major-mode, Drew Adams, 2021/02/13
- Re: [External] : Re: Smarter M-x that filters on major-mode, Stefan Monnier, 2021/02/13
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/14
- Re: Smarter M-x that filters on major-mode, Basil L. Contovounesios, 2021/02/14
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/14
- Re: Smarter M-x that filters on major-mode, Basil L. Contovounesios, 2021/02/14
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/14
- Re: Smarter M-x that filters on major-mode, Dmitry Gutov, 2021/02/14
- Re: Smarter M-x that filters on major-mode, Alan Mackenzie, 2021/02/14
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/14
- Re: Smarter M-x that filters on major-mode,
Lars Ingebrigtsen <=
- RE: [External] : Re: Smarter M-x that filters on major-mode, Drew Adams, 2021/02/12
- Re: [External] : Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/13
- 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/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, 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