Commit b099e063 authored by Don March's avatar Don March Committed by Lars Magne Ingebrigtsen

Fix non-prefix key error message when last character M-[char] is translated to ESC [char]

parent b96dec83
2010-12-03 Don March <don@ohspite.net>
* keymap.c (Fdefine_key): Fix non-prefix key error message when
last character M-[char] is translated to ESC [char] (bug#7541).
2011-08-02 Kenichi Handa <handa@m17n.org>
* lisp.h (uniprop_table): Extern it.
......
......@@ -1216,13 +1216,27 @@ binding KEY to DEF is added at the front of KEYMAP. */)
keymap = get_keymap (cmd, 0, 1);
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 starts with non-prefix key %s",
SDATA (Fkey_description (key, Qnil)),
SDATA (Fkey_description (Fsubstring (key, make_number (0),
make_number (idx)),
Qnil)));
{
char trailing_esc[5];
if (c == meta_prefix_char && metized)
{
if (idx == 0)
strcpy(trailing_esc, "ESC");
else
strcpy(trailing_esc, " ESC");
}
else
strcpy(trailing_esc, "");
/* We must use Fkey_description rather than just passing key to
error; key might be a vector, not a string. */
error ("Key sequence %s starts with non-prefix key %s%s",
SDATA (Fkey_description (key, Qnil)),
SDATA (Fkey_description (Fsubstring (key, make_number (0),
make_number (idx)),
Qnil)),
trailing_esc);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment