]> code.delx.au - gnu-emacs/commitdiff
(Fdefine_key): Improve error message when KEY begins with a non-prefix key.
authorRichard M. Stallman <rms@gnu.org>
Sun, 30 Apr 2006 22:15:21 +0000 (22:15 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 30 Apr 2006 22:15:21 +0000 (22:15 +0000)
src/ChangeLog
src/keymap.c

index 99e1b6a90f188df28f027643629374360fd557d1..1f96b0aaaa4dea5fe88a92fc69d9121dc97b35a8 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-30  Richard Stallman  <rms@gnu.org>
+
+       * keymap.c (Fdefine_key): Improve error message
+       when KEY begins with a non-prefix key.
+
 2006-04-30  Martin Rudalics  <rudalics@gmx.at>  (tiny change)
 
        * syntax.c (Fforward_comment): Don't forget to break out of the loop
index 66f17178d5bd564fd4c81592a7a2f41b537a6eed..4f8343bf5cfe0a8589c9c3a2d840b19cbfaf5db0 100644 (file)
@@ -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)));
     }
 }