GNU bug report logs - #7541
24.0.50; define-key error message for non-prefix M-[char]

Previous Next

Package: emacs;

Reported by: Don March <don <at> ohspite.net>

Date: Fri, 3 Dec 2010 16:45:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 24.0.50

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 7541 <at> debbugs.gnu.org (full text, mbox):

From: Don March <don <at> ohspite.net>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 7541 <at> debbugs.gnu.org
Subject: Re: 24.0.50; define-key error message for non-prefix M-[char]
Date: Sun, 3 Jul 2011 12:24:03 -0400
I just sent an email to assign <at> gnu.org.  I'll report back when the
process is complete.

On Sun, Jul 3, 2011 at 9:39 AM, Lars Magne Ingebrigtsen <larsi <at> gnus.org> wrote:
> Don March <don <at> ohspite.net> 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/
>




This bug report was last modified 14 years and 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.