From: Kenichi Handa Date: Mon, 25 Sep 2006 02:52:03 +0000 (+0000) Subject: (Fsingle_key_description): Return unique names for X-Git-Tag: emacs-pretest-22.0.90~351 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=173517c6c1c98b4f5066357603adf791e9696c54;p=emacs.git (Fsingle_key_description): Return unique names for generic characters. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6a6761e7204..d3533e377b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-09-25 Kenichi Handa + + * keymap.c (Fsingle_key_description): Return unique names for + generic characters. + 2006-09-24 Richard Stallman * search.c (compile_pattern_1): Don't BLOCK_INPUT. diff --git a/src/keymap.c b/src/keymap.c index aad586ab1d0..67b0ed3a846 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -2386,15 +2386,22 @@ around function keys and event symbols. */) 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 {