diff options
| author | Kenichi Handa | 1997-03-18 23:31:34 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-03-18 23:31:34 +0000 |
| commit | 1df19f02032a543c303bb21982ebd2a1278677ff (patch) | |
| tree | ea0f9acd7b44e5d82070865ea3f330377998ead8 /src/keymap.c | |
| parent | b96656ce4e29cdead9a1786a5d3f140a8bb95d6d (diff) | |
| download | emacs-1df19f02032a543c303bb21982ebd2a1278677ff.tar.gz emacs-1df19f02032a543c303bb21982ebd2a1278677ff.zip | |
(describe_vector): Adjusted for the change of CHAR_TABLE_ORDINARY_SLOTS.
(push_key_description): A key code less than 512 is printed with 3
octal numbers. Print only entries of valid charsets.
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/keymap.c b/src/keymap.c index d300b7a6e4e..2cecfcd3762 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1598,16 +1598,13 @@ push_key_description (c, p) | |||
| 1598 | else if (c < 128) | 1598 | else if (c < 128) |
| 1599 | *p++ = c; | 1599 | *p++ = c; |
| 1600 | else if (c < 256) | 1600 | else if (c < 256) |
| 1601 | *p++ = c; | ||
| 1602 | else if (c < 512) | ||
| 1601 | { | 1603 | { |
| 1602 | if (current_buffer->enable_multibyte_characters) | 1604 | *p++ = '\\'; |
| 1603 | *p++ = c; | 1605 | *p++ = (7 & (c >> 6)) + '0'; |
| 1604 | else | 1606 | *p++ = (7 & (c >> 3)) + '0'; |
| 1605 | { | 1607 | *p++ = (7 & (c >> 0)) + '0'; |
| 1606 | *p++ = '\\'; | ||
| 1607 | *p++ = (7 & (c >> 6)) + '0'; | ||
| 1608 | *p++ = (7 & (c >> 3)) + '0'; | ||
| 1609 | *p++ = (7 & (c >> 0)) + '0'; | ||
| 1610 | } | ||
| 1611 | } | 1608 | } |
| 1612 | else | 1609 | else |
| 1613 | { | 1610 | { |
| @@ -2564,7 +2561,10 @@ describe_vector (vector, elt_prefix, elt_describer, | |||
| 2564 | /* A char-table is not that deep. */ | 2561 | /* A char-table is not that deep. */ |
| 2565 | wrong_type_argument (Qchar_table_p, vector); | 2562 | wrong_type_argument (Qchar_table_p, vector); |
| 2566 | 2563 | ||
| 2567 | for (i = 0; i < this_level; i++) | 2564 | /* For multibyte characters, the top level index for |
| 2565 | charsets starts from 256. */ | ||
| 2566 | idx[0] = XINT (XVECTOR (elt_prefix)->contents[0]) - 128; | ||
| 2567 | for (i = 1; i < this_level; i++) | ||
| 2568 | idx[i] = XINT (XVECTOR (elt_prefix)->contents[i]); | 2568 | idx[i] = XINT (XVECTOR (elt_prefix)->contents[i]); |
| 2569 | complete_char | 2569 | complete_char |
| 2570 | = (CHARSET_VALID_P (idx[0]) | 2570 | = (CHARSET_VALID_P (idx[0]) |
| @@ -2593,8 +2593,13 @@ describe_vector (vector, elt_prefix, elt_describer, | |||
| 2593 | for (i = from; i < to; i++) | 2593 | for (i = from; i < to; i++) |
| 2594 | { | 2594 | { |
| 2595 | QUIT; | 2595 | QUIT; |
| 2596 | definition = get_keyelt (XVECTOR (vector)->contents[i], 0); | ||
| 2597 | 2596 | ||
| 2597 | if (this_level == 0 | ||
| 2598 | && i >= CHAR_TABLE_SINGLE_BYTE_SLOTS | ||
| 2599 | && !CHARSET_DEFINED_P (i - 128)) | ||
| 2600 | continue; | ||
| 2601 | |||
| 2602 | definition = get_keyelt (XVECTOR (vector)->contents[i], 0); | ||
| 2598 | if (NILP (definition)) continue; | 2603 | if (NILP (definition)) continue; |
| 2599 | 2604 | ||
| 2600 | /* Don't mention suppressed commands. */ | 2605 | /* Don't mention suppressed commands. */ |
| @@ -2681,12 +2686,12 @@ describe_vector (vector, elt_prefix, elt_describer, | |||
| 2681 | if (multibyte && CHAR_TABLE_P (vector) && CHAR_TABLE_P (definition)) | 2686 | if (multibyte && CHAR_TABLE_P (vector) && CHAR_TABLE_P (definition)) |
| 2682 | { | 2687 | { |
| 2683 | if (this_level == 0 | 2688 | if (this_level == 0 |
| 2684 | && CHARSET_VALID_P (i)) | 2689 | && CHARSET_VALID_P (i - 128)) |
| 2685 | { | 2690 | { |
| 2686 | /* Before scanning the deeper table, print the | 2691 | /* Before scanning the deeper table, print the |
| 2687 | information for this character set. */ | 2692 | information for this character set. */ |
| 2688 | insert_string ("\t\t<charset:"); | 2693 | insert_string ("\t\t<charset:"); |
| 2689 | tem2 = CHARSET_TABLE_INFO (i, CHARSET_SHORT_NAME_IDX); | 2694 | tem2 = CHARSET_TABLE_INFO (i - 128, CHARSET_SHORT_NAME_IDX); |
| 2690 | insert_from_string (tem2, 0 , XSTRING (tem2)->size, 0); | 2695 | insert_from_string (tem2, 0 , XSTRING (tem2)->size, 0); |
| 2691 | insert (">", 1); | 2696 | insert (">", 1); |
| 2692 | } | 2697 | } |