changeset 70293:3f5619e77411

(Fdefine_key): Improve error message when KEY begins with a non-prefix key.
author Richard M. Stallman <rms@gnu.org>
date Sun, 30 Apr 2006 22:15:13 +0000
parents 2b77fa42947f
children e96921005878
files src/keymap.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Sun Apr 30 15:49:08 2006 +0000
+++ b/src/keymap.c	Sun Apr 30 22:15:13 2006 +0000
@@ -1193,8 +1193,11 @@
       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)));
     }
 }