Subject: bug#61184: 29.0.60; keymap-local-set and keymap-global-set became less strict

From: Daniel Mendler <[email-masked]>
Date: Mon, 30 Jan 2023 22:06:01 +0100

On 1/30/23 22:00, Stefan Monnier wrote:
> I don't see any use for the vector->string conversion to happen in the
> interactive spec: I think the most important use cases for accepting
> vectors is when these come directly from Lisp, in which case having to
> convert them back to the KBD syntax (only to hope `key-parse` will
> correctly undo the damage) is just a waste and a hurdle.

> Obviously, I disagree: the vector format is not going anywhere, so it
> makes a lot sense to accept it, even though I fully agree that guidance
> should never suggest the use of the vector format.

Stefan, I know that you disagree, see the other thread. I am not the one
to debate this with. Please discuss this with Lars, who introduced the
API and intended it to be as strict as it was. Now the API gets relaxed
through the backdoor because of the broken interactive use. This is why
I am objecting.

All I want is that the keymap.el API overall is consistent - currently
it is not. The keymap-local/global-set made parts of the API accept
vectors, key-parse accepts invalid strings and the rest seems to only
accept strictly conforming key strings.

I think what Lars had in mind with a strict string-only API for
keymap.el, since this creates a consistent picture for keymap
definitions. I agree that internally the vectors are not going away and
that is okay, but this does not prohibit creating the more strict
superficial string only API.

Daniel