changeset 73111:ff38c618b993

(Fsingle_key_description): Return unique names for generic characters.
author Kenichi Handa <handa@m17n.org>
date Mon, 25 Sep 2006 02:51:13 +0000
parents 1f708673d34f
children fb7e7f16e31c
files src/keymap.c
diffstat 1 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Sun Sep 24 22:09:06 2006 +0000
+++ b/src/keymap.c	Mon Sep 25 02:51:13 2006 +0000
@@ -2386,15 +2386,22 @@
 	SPLIT_CHAR (without_bits, charset, c1, c2);
 
       if (charset
-	  && CHARSET_DEFINED_P (charset)
-	  && ((c1 >= 0 && c1 < 32)
-	      || (c2 >= 0 && c2 < 32)))
+	  && CHAR_VALID_P (charset, 1)
+	  && (c1 == 0 || c2 == 0))
 	{
 	  /* Handle a generic character.  */
 	  Lisp_Object name;
-	  name = CHARSET_TABLE_INFO (charset, CHARSET_LONG_NAME_IDX);
+	  char buf[256];
+
+	  name = CHARSET_TABLE_INFO (charset, CHARSET_SHORT_NAME_IDX);
 	  CHECK_STRING (name);
-	  return concat2 (build_string ("Character set "), name);
+	  if (c1 == 0)
+	    /* Only a charset is specified.   */
+	    sprintf (buf, "Generic char %d: all of ", without_bits);
+	  else
+	    /* 1st code-point of 2-dimensional charset is specified.   */
+	    sprintf (buf, "Generic char %d: row %d of ", without_bits, c1);
+	  return concat2 (build_string (buf), name);
 	}
       else
 	{