Subject: bug#78714: 30.1; failure binding keys to certain unicode characters

From: Robert Pluim <[email-masked]>
Date: Wed, 11 Jun 2025 15:40:13 +0200

tags 78714 fixed
close 78714 30.2
quit

>>>>> On Mon, 09 Jun 2025 17:40:44 +0300, Eli Zaretskii <[email-masked]> said:

    >> Cc: [email-masked], Andreas Schwab <[email-masked]>
    >> From: Robert Pluim <[email-masked]>
    >> Date: Mon, 09 Jun 2025 13:48:31 +0200
    >> 
    >> >>>>> On Mon, 9 Jun 2025 11:05:40 +0100, John Holman <[email-masked]> said:
    >> 
    John> Many thanks Andreas - that's certainly more concise than using a lambda.
    John> I do think this is a trap for users who may expect that a key definition
    John> that a single character string simply specifies the character to be
    John> inserted when that key is pressed rather than a macro. Treating a string
    John> with a single character as a character to insert rather than a
    John> one-character macro might avoid that, or if that is awkward to implement or
    John> otherwise undesirable an explicit warning in the documentation might help.
    John> The documentation for define-key does say that a string is treated as a
    John> keyboard macro, but the significance of that is easy to miss.
    >> 
    >> (info "(emacs) Init Rebinding") describes how to do this. The
    >> docstring for `keymap-global-set' also mentions `key-description',
    >> which avoids the need to manually write in vector notation, which I
    >> guess we could add to `keymap-set' as well.

    Eli> Feel free to add that.

Done

Robert
-- 

Pushed to emacs-30.

1bed2949583 2025-06-11T15:34:10+02:00 "* lisp/keymap.el (keymap-set): Refer to 'key-description'.  (Bug#78714)"
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1bed29495836dab96fe642dbd6f4c1625c50b12a