[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suggested experimental test
From: |
Stefan Kangas |
Subject: |
Re: Suggested experimental test |
Date: |
Fri, 26 Mar 2021 05:34:23 -0500 |
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 25.03.2021 23:11, Stefan Monnier wrote:
>> E.g. if it's bound to `C-c` it's fairly convenient to have bindings
>> within it of the form `C-<letter>`, but if it's bound to `c` instead
>> (assuming a a modal key-binding scheme like vi) then using `C-<letter>`
>> within it is much less convenient.
>
> Interesting example. I wanted to say nobody will bind it to 'c', but
> some people might decide to bind it to M-c instead.
>
> Here's a thought: let's invent an extension of the kbd syntax which will
> allow us to specify a modifier indirectly based on an entry in
> key-translation-map. Like:
>
> (kbd "<mode-specific> <mode-specific-modifier>-c")
>
> Even more backward-incompatible, but okay. But what to do if
> <mode-specific> has no modifiers, like <menu> in Yuri's example?
> Translate '<mode-specific-modifier>-c' to just 'c'? What happens to any
> other simple 'c' entry in that keymap? Do we "flip" it to, say, 'C-c'?
How about something like:
(mode-kbd "k") ; C-c k
(mode-kbd "mod k") ; C-c C-k
(mode-kbd "mod2 k") ; C-c M-k
(mode-kbd "mod3 k") ; C-c S-k
Then mod, mod2 and mod3 could be set to use whatever modifier you want.
And mode-kbd would use the correct prefix.
(BTW, it would be even nicer if we could evaluate such a form on
key lookup.)
- Re: Suggested experimental test, (continued)
- Re: Suggested experimental test, Yuri Khan, 2021/03/23
- Re: Suggested experimental test, Dmitry Gutov, 2021/03/24
- Re: Suggested experimental test, Yuri Khan, 2021/03/25
- Re: Suggested experimental test, Dmitry Gutov, 2021/03/25
- Re: Suggested experimental test, Basil L. Contovounesios, 2021/03/25
- Re: Suggested experimental test, Dmitry Gutov, 2021/03/25
- Re: Suggested experimental test, Yuri Khan, 2021/03/25
- Re: Suggested experimental test, Yuri Khan, 2021/03/25
- Re: Suggested experimental test, Stefan Monnier, 2021/03/25
- Re: Suggested experimental test, Dmitry Gutov, 2021/03/25
- Re: Suggested experimental test,
Stefan Kangas <=
- Re: Suggested experimental test, Dmitry Gutov, 2021/03/26
- Re: Suggested experimental test, Dmitry Gutov, 2021/03/26
- Re: Suggested experimental test, Stefan Monnier, 2021/03/26
- Re: Suggested experimental test, Dmitry Gutov, 2021/03/28
- Re: Suggested experimental test, Gregory Heytings, 2021/03/22
- Re: Suggested experimental test, Lars Ingebrigtsen, 2021/03/22
- Re: Suggested experimental test, Alfred M. Szmidt, 2021/03/22
- Re: Suggested experimental test, Thierry Volpiatto, 2021/03/22
- RE: [EXTERNAL] Re: Suggested experimental test, Stephan Mueller, 2021/03/22
- Re: Suggested experimental test, Lars Ingebrigtsen, 2021/03/22