changeset 89334:0b3ed65e4e97

(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.
author Kenichi Handa <handa@m17n.org>
date Mon, 06 Jan 2003 13:26:04 +0000
parents bbd8c0d60afb
children 6a5480f8b2f9
files src/chartab.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/chartab.c	Mon Jan 06 13:25:48 2003 +0000
+++ b/src/chartab.c	Mon Jan 06 13:26:04 2003 +0000
@@ -114,7 +114,11 @@
   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 @@
 	}
       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 @@
 	   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;
 }