aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>2006-09-26 04:17:41 +0000
committerKenichi Handa <[email protected]>2006-09-26 04:17:41 +0000
commit4ccaff674425d0240670699d8b33bc69b4ff33f7 (patch)
tree7c636207f2ec3baa11f517b41f8a18ce14581e68 /src
parent25173d930bc14cdfb83463daed67923569062ffa (diff)
(Fsingle_key_description): For an invalid char, retuen
"Invalid char code NNNNN".
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/keymap.c12
2 files changed, 14 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5ba3aa07a6..8d1bb3cf19 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-26 Kenichi Handa <[email protected]>
+
+ * keymap.c (Fsingle_key_description): For an invalid char, return
+ "Invalid char code NNNNN".
+
2006-09-25 Chong Yidong <[email protected]>
* callint.c (Fcall_interactively): Doc fix.
diff --git a/src/keymap.c b/src/keymap.c
index 2c6c5ef03c..9b36ec08b6 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2385,9 +2385,15 @@ around function keys and event symbols. */)
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;