From: Stefan Monnier Date: Sun, 1 Aug 2010 00:14:14 +0000 (+0200) Subject: * src/keymap.c (Fdefine_key, Flookup_key): Say what event is invalid. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~49^2~86 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=76417ef426d826482699766064e66c06af6a07f7;p=emacs.git * src/keymap.c (Fdefine_key, Flookup_key): Say what event is invalid. --- diff --git a/src/ChangeLog b/src/ChangeLog index ee745778951..8043e118c64 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-08-01 Stefan Monnier + + * keymap.c (Fdefine_key, Flookup_key): Say what event is invalid. + 2010-07-31 Chong Yidong * xselect.c (x_own_selection): Use list4. diff --git a/src/keymap.c b/src/keymap.c index a92c085793f..5e884ae137e 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1226,7 +1226,7 @@ binding KEY to DEF is added at the front of KEYMAP. */) && (!CONSP (c) /* If C is a range, it must be a leaf. */ || (INTEGERP (XCAR (c)) && idx != length))) - error ("Key sequence contains invalid event"); + message_with_string ("Key sequence contains invalid event %s", c, 1); if (idx == length) RETURN_UNGCPRO (store_in_keymap (keymap, c, def)); @@ -1340,7 +1340,7 @@ recognize the default bindings, just as `read-key-sequence' does. */) /* Allow string since binding for `menu-bar-select-buffer' includes the buffer name in the key sequence. */ if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c) && !STRINGP (c)) - error ("Key sequence contains invalid event"); + message_with_string ("Key sequence contains invalid event %s", c, 1); cmd = access_keymap (keymap, c, t_ok, 0, 1); if (idx == length)