summaryrefslogtreecommitdiff
path: root/src/fns.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1997-05-28 04:36:22 +0000
committerKenichi Handa <handa@m17n.org>1997-05-28 04:36:22 +0000
commitc464a376eab2ca2c180eda0653ee76230b22ae40 (patch)
tree1902d4a151e4c36bc0f787c9cf0fefe2ea1dfc42 /src/fns.c
parent79f719ff8bf49327f8d490050110eb680c17caab (diff)
downloademacs-c464a376eab2ca2c180eda0653ee76230b22ae40.tar.gz
(map_char_table): For sub char-table, index should be
start from 0 (not from 32) considering a composite character. (Fmap_char_table): Doc-string adjusted. The variable indices is declared as an array of Lisp_Object.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/fns.c b/src/fns.c
index d4a48d2dc8f..b912071a5f8 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1439,11 +1439,11 @@ map_char_table (c_function, function, subtable, arg, depth, indices)
}
else
{
- i = 32;
+ i = 0;
to = SUB_CHAR_TABLE_ORDINARY_SLOTS;
}
- for (i; i < to; i++)
+ for (; i < to; i++)
{
Lisp_Object elt = XCHAR_TABLE (subtable)->contents[i];
@@ -1453,8 +1453,7 @@ map_char_table (c_function, function, subtable, arg, depth, indices)
{
if (depth >= 3)
error ("Too deep char table");
- map_char_table (c_function, function, elt, arg,
- depth + 1, indices);
+ map_char_table (c_function, function, elt, arg, depth + 1, indices);
}
else
{
@@ -1476,15 +1475,16 @@ map_char_table (c_function, function, subtable, arg, depth, indices)
DEFUN ("map-char-table", Fmap_char_table, Smap_char_table,
2, 2, 0,
- "Call FUNCTION for each range of like characters in CHAR-TABLE.\n\
+ "Call FUNCTION for each (normal and generic) characters in CHAR-TABLE.\n\
FUNCTION is called with two arguments--a key and a value.\n\
-The key is always a possible RANGE argument to `set-char-table-range'.")
+The key is always a possible IDX argument to `aref'.")
(function, char_table)
Lisp_Object function, char_table;
{
- Lisp_Object keyvec;
/* The depth of char table is at most 3. */
- Lisp_Object *indices = (Lisp_Object *) alloca (3 * sizeof (Lisp_Object));
+ Lisp_Object indices[3];
+
+ CHECK_CHAR_TABLE (char_table, 1);
map_char_table (NULL, function, char_table, char_table, 0, indices);
return Qnil;