+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.
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);
+ }
}
}