Subject: Re: 24.0.50; define-key error message for non-prefix M-[char]

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Sun, 03 Jul 2011 15:39:45 +0200

Don March <[email-masked]> writes:

> Typing and evaluating the following code in the scratch
> buffer results in an (appropriate) error, but with an incorrect
> message:
>
> (setq new-kmap (make-sparse-keymap))
> (define-key new-kmap [?a 27] 'command)
> (define-key new-kmap [?a ?\M-x] 'command)
> ;; Debugger entered--Lisp error:
> ;;   (error "Key sequence a M-x starts with non-prefix key a")
> ;; (should be:
> ;;          "Key sequence a M-x starts with non-prefix key a ESC")
>
> The code in keymap.c loops over the characters in the key sequence and
> says to report everything before the current character as the
> non-prefix key.  But that misses the case when M-x is converted into
> [27 ?x] and it's the `27' part that causes the error.

Your patch for this bug looks correct, but it's more than 10 lines long,
so the FSF needs copyright assignment papers for the code.

Do you have such paperwork on file with the FSF?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/