# HG changeset patch # User Kenichi Handa # Date 1159152673 0 # Node ID ff38c618b993ad48937e89191bc8e2a8f6e5cf4e # Parent 1f708673d34fa19d215d39bcc76d7b8c9ab909d9 (Fsingle_key_description): Return unique names for generic characters. diff -r 1f708673d34f -r ff38c618b993 src/keymap.c --- 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 {