changeset 73131:f88e4cd6cc93

(Fsingle_key_description): For an invalid char, retuen "Invalid char code NNNNN".
author Kenichi Handa <handa@m17n.org>
date Tue, 26 Sep 2006 04:16:59 +0000
parents 1e5bc57805bc
children 0f09890f4e36
files src/keymap.c
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Tue Sep 26 02:40:50 2006 +0000
+++ b/src/keymap.c	Tue Sep 26 04:16:59 2006 +0000
@@ -2385,9 +2385,15 @@
       else
 	SPLIT_CHAR (without_bits, charset, c1, c2);
 
-      if (charset
-	  && CHAR_VALID_P (charset, 1)
-	  && ((c1 == 0 && c2 == -1) || c2 == 0))
+      if (! CHAR_VALID_P (without_bits, 1))
+	{
+	  char buf[256];
+
+	  sprintf (buf, "Invalid char code %d", XINT (key));
+	  return build_string (buf);
+	}
+      else if (charset
+	       && ((c1 == 0 && c2 == -1) || c2 == 0))
 	{
 	  /* Handle a generic character.  */
 	  Lisp_Object name;