Subject: format-kbd-macro returns a key name that keymap-lookup doesn't recognize

From: Eduardo Ochs <[email-masked]>
Date: Sat, 12 Oct 2024 01:46:26 -0300

Hi list,

if we run this

  (format-kbd-macro (read-key-sequence-vector "Type C-M-h:"))

we get "M-C-h". But try:

  (keymap-lookup global-map "M-C-h")
    ;;-> "M-C-h" is not a valid key definition; see `key-valid-p'

  (keymap-lookup global-map "C-M-h")
    ;;-> mark-defun

Tested on GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu,
GTK+ Version 3.24.24, cairo version 1.16.0) of 2024-10-11,
git-pulled and compiled a few hours ago.

  Cheers,
    Eduardo Ochs
    http://anggtwu.net/