bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59305: 29.0.50; keymap-global-set handling of string bindings differ


From: Stefan Monnier
Subject: bug#59305: 29.0.50; keymap-global-set handling of string bindings different from global-set-key
Date: Mon, 06 May 2024 09:24:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

>     Stefan> `key-parse` always returns a vector.
> You want us to recommend this?
> (keymap-global-set "C-a" (key-parse "hello"))

Sorry, I was not thinking right.  The function you'd need to use to
convert "hello" into the proper form for `keymap-global-set` is either:

- `key-description`: does the "reverse" of `kbd` and `key-parse`.
- `kmacro--to-vector`: turns an old-style string of events to a vector
  of events.

> so Iʼd still worry about future regressions caused by `key-parse'
> being changed to enforce `key-valid-p'

Indeed.  Not only that, but it'll mis-interpret `C-a` to mean a single
event instead of 3 events.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]