Commit 0a4bacdc authored by Kenichi Handa's avatar Kenichi Handa

(map_sub_char_table): If the range contains just one

character, call the function with that character even if the depth
is not 3.
(map_char_table): Likewise.
parent 3e91c575
......@@ -805,8 +805,7 @@ map_sub_char_table (c_function, function, table, arg, val, range,
if (! NILP (val) && different_value)
{
XSETCDR (range, make_number (c - 1));
if (depth == 3
&& EQ (XCAR (range), XCDR (range)))
if (EQ (XCAR (range), XCDR (range)))
{
if (c_function)
(*c_function) (arg, XCAR (range), val);
......@@ -875,10 +874,20 @@ map_char_table (c_function, function, table, arg)
if (! NILP (val))
{
if (c_function)
(*c_function) (arg, range, val);
if (EQ (XCAR (range), XCDR (range)))
{
if (c_function)
(*c_function) (arg, XCAR (range), val);
else
call2 (function, XCAR (range), val);
}
else
call2 (function, range, val);
{
if (c_function)
(*c_function) (arg, range, val);
else
call2 (function, range, val);
}
}
UNGCPRO;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment