From: Richard M. Stallman Date: Sun, 30 Apr 2006 22:15:21 +0000 (+0000) Subject: (Fdefine_key): Improve error message when KEY begins with a non-prefix key. X-Git-Tag: emacs-pretest-22.0.90~2891 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9abc5f4519ebcaf74a937581784fe4e73c2e8a06;p=emacs.git (Fdefine_key): Improve error message when KEY begins with a non-prefix key. --- diff --git a/src/ChangeLog b/src/ChangeLog index 99e1b6a90f1..1f96b0aaaa4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-04-30 Richard Stallman + + * keymap.c (Fdefine_key): Improve error message + when KEY begins with a non-prefix key. + 2006-04-30 Martin Rudalics (tiny change) * syntax.c (Fforward_comment): Don't forget to break out of the loop diff --git a/src/keymap.c b/src/keymap.c index 66f17178d5b..4f8343bf5cf 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1193,8 +1193,11 @@ binding KEY to DEF is added at the front of KEYMAP. */) if (!CONSP (keymap)) /* We must use Fkey_description rather than just passing key to error; key might be a vector, not a string. */ - error ("Key sequence %s uses invalid prefix characters", - SDATA (Fkey_description (key, Qnil))); + error ("Key sequence %s starts with non-prefix key %s", + SDATA (Fkey_description (key, Qnil)), + SDATA (Fkey_description (Fsubstring (key, make_number (0), + make_number (idx)), + Qnil))); } }