Mercurial > emacs
comparison src/keymap.c @ 17189:7c008ec99e97
(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.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Tue, 18 Mar 1997 23:31:34 +0000 |
| parents | 60ad27660a65 |
| children | fad065a280dc |
comparison
equal
deleted
inserted
replaced
| 17188:e38cc84db8ab | 17189:7c008ec99e97 |
|---|---|
| 1596 *p++ = 'C'; | 1596 *p++ = 'C'; |
| 1597 } | 1597 } |
| 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 { | 1601 *p++ = c; |
| 1602 if (current_buffer->enable_multibyte_characters) | 1602 else if (c < 512) |
| 1603 *p++ = c; | 1603 { |
| 1604 else | 1604 *p++ = '\\'; |
| 1605 { | 1605 *p++ = (7 & (c >> 6)) + '0'; |
| 1606 *p++ = '\\'; | 1606 *p++ = (7 & (c >> 3)) + '0'; |
| 1607 *p++ = (7 & (c >> 6)) + '0'; | 1607 *p++ = (7 & (c >> 0)) + '0'; |
| 1608 *p++ = (7 & (c >> 3)) + '0'; | |
| 1609 *p++ = (7 & (c >> 0)) + '0'; | |
| 1610 } | |
| 1611 } | 1608 } |
| 1612 else | 1609 else |
| 1613 { | 1610 { |
| 1614 *p++ = '\\'; | 1611 *p++ = '\\'; |
| 1615 *p++ = (7 & (c >> 15)) + '0'; | 1612 *p++ = (7 & (c >> 15)) + '0'; |
| 2562 this_level = XVECTOR (elt_prefix)->size; | 2559 this_level = XVECTOR (elt_prefix)->size; |
| 2563 if (this_level >= 3) | 2560 if (this_level >= 3) |
| 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]) |
| 2571 && ((CHARSET_DIMENSION (idx[0]) == 1 && this_level == 1) | 2571 && ((CHARSET_DIMENSION (idx[0]) == 1 && this_level == 1) |
| 2572 || this_level == 2)); | 2572 || this_level == 2)); |
| 2591 } | 2591 } |
| 2592 | 2592 |
| 2593 for (i = from; i < to; i++) | 2593 for (i = from; i < to; i++) |
| 2594 { | 2594 { |
| 2595 QUIT; | 2595 QUIT; |
| 2596 | |
| 2597 if (this_level == 0 | |
| 2598 && i >= CHAR_TABLE_SINGLE_BYTE_SLOTS | |
| 2599 && !CHARSET_DEFINED_P (i - 128)) | |
| 2600 continue; | |
| 2601 | |
| 2596 definition = get_keyelt (XVECTOR (vector)->contents[i], 0); | 2602 definition = get_keyelt (XVECTOR (vector)->contents[i], 0); |
| 2597 | |
| 2598 if (NILP (definition)) continue; | 2603 if (NILP (definition)) continue; |
| 2599 | 2604 |
| 2600 /* Don't mention suppressed commands. */ | 2605 /* Don't mention suppressed commands. */ |
| 2601 if (SYMBOLP (definition) && partial) | 2606 if (SYMBOLP (definition) && partial) |
| 2602 { | 2607 { |
| 2679 scan it recursively; it defines the details for | 2684 scan it recursively; it defines the details for |
| 2680 a character set or a portion of a character set. */ | 2685 a character set or a portion of a character set. */ |
| 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 } |
| 2693 | 2698 |
| 2694 insert ("\n", 1); | 2699 insert ("\n", 1); |
