From: Kenichi Handa Date: Mon, 6 Jan 2003 13:26:04 +0000 (+0000) Subject: (char_table_ascii): Check if the char table contents X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~131 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=40033db7ce3d17cd21df942dadf8e5964b97403e;p=emacs.git (char_table_ascii): Check if the char table contents is sub-char-table or not. (char_table_set): Fix argument to char_table_ascii. (char_table_set_range): Likewise. --- diff --git a/src/chartab.c b/src/chartab.c index 919331f7878..2b4c37755fa 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -114,7 +114,11 @@ char_table_ascii (table) Lisp_Object sub; sub = XCHAR_TABLE (table)->contents[0]; + if (! SUB_CHAR_TABLE_P (sub)) + return sub; sub = XSUB_CHAR_TABLE (sub)->contents[0]; + if (! SUB_CHAR_TABLE_P (sub)) + return sub; return XSUB_CHAR_TABLE (sub)->contents[0]; } @@ -415,7 +419,7 @@ char_table_set (table, c, val) } sub_char_table_set (sub, c, val); if (ASCII_CHAR_P (c)) - tbl->ascii = char_table_ascii (tbl); + tbl->ascii = char_table_ascii (table); } return val; } @@ -472,7 +476,7 @@ char_table_set_range (table, from, to, val) i++, min_char += chartab_chars[0]) sub_char_table_set_range (contents + i, 0, min_char, from, to, val); if (ASCII_CHAR_P (from)) - tbl->ascii = char_table_ascii (tbl); + tbl->ascii = char_table_ascii (table); } return val; }