[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master f3aa648: Make `lookup-key' understand the new key sequence sy
From: |
Stefan Monnier |
Subject: |
Re: master f3aa648: Make `lookup-key' understand the new key sequence syntax |
Date: |
Tue, 19 Oct 2021 10:13:53 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Lars Ingebrigtsen [2021-10-19 15:40:57] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I think your `possibly_translate_key_sequence` should be extended to
>> cover the XEmacs format as well, And it should be exported to ELisp.
>
> lookup-key/define-key already understands that format, but mixes the
> interpretation into the code itself.
>
> (lookup-key (current-global-map) [(control x) (control f)])
> => find-file
>
> Pulling it out of the code and putting it into
> possibly_translate_key_sequence would be fine, I think.
>
>> And I'd argue it should also convert strings to vectors.
>
> Sure.
>
>> Oh and also convert [M-C-next] to [C-M-next].
>
> Uhm... I'm not sure what the impact would be...
In terms of behavior, no impact:
ELISP> (let ((map (make-sparse-keymap))) (define-key map [C-M-next] 'dummy)
map)
(keymap (C-M-next . dummy))
ELISP> (let ((map (make-sparse-keymap))) (define-key map [M-C-next] 'dummy)
map)
(keymap (C-M-next . dummy))
ELISP>
-- Stefan