[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50804: Command substitutions for keys without keymaps
From: |
Stefan Kangas |
Subject: |
bug#50804: Command substitutions for keys without keymaps |
Date: |
Sat, 20 Nov 2021 16:05:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Stefan Kangas <stefan@marxist.se> writes:
>
>> The second one will be printed as "\‘C-h‘" on old versions, which isn't
>> perfect but not too bad. Even if the extra "\" is distracting, it is at
>> least not actively misleading...
>
> That's a good point. So perhaps \\`C-h' does make sense in
> `substitute-command-keys'.
I found a patch of mine from March that I had forgotten about. It uses
the syntax "\\[=y]" to mean the key "y" where, I guess, we could
stipulate that whatever comes after "=" is `key-valid-p'.
However, it breaks backwards incompatibility just as "\\[[y]]" would:
(substitute-command-keys "\\[=k]")
=> "M-x =k"
(substitute-command-keys "\\[[y]]")
=> "M-x [y]"
Which is just... wrong. So either we say that, you know, don't use this
syntax in code intended for use in anything older Emacs 29, or we just
go with the new syntax \\`y`.
Given that I have a seemingly mostly working patch it should be easy to
fix it up whichever way we decide to go. I hope.
- bug#50804: Command substitutions for keys without keymaps,
Stefan Kangas <=
- bug#50804: Command substitutions for keys without keymaps, Lars Ingebrigtsen, 2021/11/21
- bug#50804: Command substitutions for keys without keymaps, Stefan Kangas, 2021/11/21
- bug#50804: Command substitutions for keys without keymaps, Lars Ingebrigtsen, 2021/11/21
- bug#50804: Command substitutions for keys without keymaps, Stefan Kangas, 2021/11/22
- bug#50804: Command substitutions for keys without keymaps, Eli Zaretskii, 2021/11/22
- bug#50804: Command substitutions for keys without keymaps, Eli Zaretskii, 2021/11/22
- bug#50804: Command substitutions for keys without keymaps, Stefan Kangas, 2021/11/22