Commit 13c5d120 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(Fset_char_table_range): Handle charsets ascii,

eight-bit-control, and eight-bit-graphic correctly.
parent 2883d842
2004-02-04 Kenichi Handa <handa@m17n.org>
* fns.c (Fset_char_table_range): Handle charsets ascii,
eight-bit-control, and eight-bit-graphic correctly.
2004-02-03 Jason Rumney <jasonr@gnu.org>
* w32select.c (Fw32_set_clipboard_data): Make coding iso2022 safe.
......
......@@ -2512,14 +2512,26 @@ character set, or a character code. Return VALUE. */)
else if (SYMBOLP (range))
{
Lisp_Object charset_info;
int charset_id;
charset_info = Fget (range, Qcharset);
CHECK_VECTOR (charset_info);
return Faset (char_table,
make_number (XINT (XVECTOR (charset_info)->contents[0])
+ 128),
value);
if (! VECTORP (charset_info)
|| ! NATNUMP (AREF (charset_info, 0))
|| (charset_id = XINT (AREF (charset_info, 0)),
! CHARSET_DEFINED_P (charset_id)))
error ("Invalid charset: %s", SYMBOL_NAME (range));
if (charset_id == CHARSET_ASCII)
for (i = 0; i < 128; i++)
XCHAR_TABLE (char_table)->contents[i] = value;
else if (charset_id == CHARSET_8_BIT_CONTROL)
for (i = 128; i < 160; i++)
XCHAR_TABLE (char_table)->contents[i] = value;
else if (charset_id == CHARSET_8_BIT_GRAPHIC)
for (i = 160; i < 256; i++)
XCHAR_TABLE (char_table)->contents[i] = value;
else
XCHAR_TABLE (char_table)->contents[charset_id + 128] = value;
}
else if (INTEGERP (range))
Faset (char_table, range, value);
......
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