aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
authorKenichi Handa1997-03-18 23:31:34 +0000
committerKenichi Handa1997-03-18 23:31:34 +0000
commit3a6cf6bde3c11108b5fb454d228d530a86ffa348 (patch)
tree7c576a5c5dd5539a49dc3d03304dff949d326b9f /src/data.c
parentcd49fad3f12beb3844dac4c75d4ce0a1fda76abd (diff)
downloademacs-3a6cf6bde3c11108b5fb454d228d530a86ffa348.tar.gz
emacs-3a6cf6bde3c11108b5fb454d228d530a86ffa348.zip
(Faref, Faset): Adjusted for the change of CHAR_TABLE_ORDINARY_SLOTS.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/data.c b/src/data.c
index 4db329233f1..5db57f5e0cf 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1547,10 +1547,10 @@ or a byte-code object. IDX starts at 0.")
1547 1547
1548 if (idxval < 0) 1548 if (idxval < 0)
1549 args_out_of_range (array, idx); 1549 args_out_of_range (array, idx);
1550 if (idxval < CHAR_TABLE_ORDINARY_SLOTS) 1550 if (idxval < CHAR_TABLE_SINGLE_BYTE_SLOTS)
1551 { 1551 {
1552 /* The element is stored in the top table. We may return a 1552 /* For ASCII or 8-bit European characters, the element is
1553 deeper char-table. */ 1553 stored in the top table. */
1554 val = XCHAR_TABLE (array)->contents[idxval]; 1554 val = XCHAR_TABLE (array)->contents[idxval];
1555 if (NILP (val)) 1555 if (NILP (val))
1556 val = XCHAR_TABLE (array)->defalt; 1556 val = XCHAR_TABLE (array)->defalt;
@@ -1571,16 +1571,11 @@ or a byte-code object. IDX starts at 0.")
1571 int i, len; 1571 int i, len;
1572 Lisp_Object sub_array; 1572 Lisp_Object sub_array;
1573 1573
1574 /* There's no reason to treat a composite character
1575 specially here. */
1576#if 0
1577 if (COMPOSITE_CHAR_P (idxval))
1578 /* For a composite characters, we use the first element as
1579 the index. */
1580 idxval = cmpchar_component (idxval, 0);
1581#endif
1582 SPLIT_NON_ASCII_CHAR (idxval, idx[0], idx[1], idx[2]); 1574 SPLIT_NON_ASCII_CHAR (idxval, idx[0], idx[1], idx[2]);
1583 len = (COMPOSITE_CHAR_P (idxval) || idx[2]) ? 3 : (idx[1] ? 2 : 1); 1575 len = (COMPOSITE_CHAR_P (idxval) || idx[2]) ? 3 : (idx[1] ? 2 : 1);
1576 /* The top level char-table should be indexed from 256 for
1577 each non-ASCII charsets. */
1578 idx[0] += 128;
1584 1579
1585 try_parent_char_table: 1580 try_parent_char_table:
1586 sub_array = array; 1581 sub_array = array;
@@ -1673,7 +1668,7 @@ ARRAY may be a vector or a string. IDX starts at 0.")
1673 1668
1674 if (idxval < 0) 1669 if (idxval < 0)
1675 args_out_of_range (array, idx); 1670 args_out_of_range (array, idx);
1676 if (idxval < CHAR_TABLE_ORDINARY_SLOTS) 1671 if (idxval < CHAR_TABLE_SINGLE_BYTE_SLOTS)
1677 XCHAR_TABLE (array)->contents[idxval] = newelt; 1672 XCHAR_TABLE (array)->contents[idxval] = newelt;
1678 else 1673 else
1679 { 1674 {
@@ -1683,6 +1678,9 @@ ARRAY may be a vector or a string. IDX starts at 0.")
1683 1678
1684 SPLIT_NON_ASCII_CHAR (idxval, idx[0], idx[1], idx[2]); 1679 SPLIT_NON_ASCII_CHAR (idxval, idx[0], idx[1], idx[2]);
1685 len = (COMPOSITE_CHAR_P (idxval) || idx[2]) ? 2 : (idx[1] ? 1 : 0); 1680 len = (COMPOSITE_CHAR_P (idxval) || idx[2]) ? 2 : (idx[1] ? 1 : 0);
1681 /* The top level char-table should be indexed from 256 for
1682 each non-ASCII charsets. */
1683 idx[0] += 128;
1686 1684
1687 for (i = 0; i < len; i++) 1685 for (i = 0; i < len; i++)
1688 { 1686 {