Add missing `=ucs@jis' features.
[chise/xemacs-chise.git.1] / src / chartab.c
index e6daf37..142c03a 100644 (file)
@@ -1073,7 +1073,7 @@ Lisp_Object Qsystem_char_id;
 Lisp_Object Qcomposition;
 Lisp_Object Q_decomposition;
 Lisp_Object Qto_ucs;
-Lisp_Object Q_ucs_variants;
+Lisp_Object Q_ucs_unified;
 Lisp_Object Qcompat;
 Lisp_Object Qisolated;
 Lisp_Object Qinitial;
@@ -1170,7 +1170,7 @@ Return variants of CHARACTER.
   Lisp_Object ret;
 
   CHECK_CHAR (character);
-  ret = Fget_char_attribute (character, Q_ucs_variants, Qnil);
+  ret = Fget_char_attribute (character, Q_ucs_unified, Qnil);
   if (CONSP (ret))
     return Fcopy_list (ret);
   else
@@ -2358,7 +2358,8 @@ For internal use.  Don't use it.
 */
        (c, value))
 {
-  put_char_id_table_0 (char_attribute_table_to_put, c, value_to_put);
+  put_char_id_table_0 (char_attribute_table_to_put,
+                      XCHAR (c), value_to_put);
   return Qnil;
 }
 #endif
@@ -2394,11 +2395,21 @@ put_char_table (Lisp_Char_Table *ct, struct chartab_range *range,
        */
        if ( CHAR_TABLEP (encoding_table) )
          {
+           Lisp_Object mother = XCHARSET_MOTHER (range->charset);
+
            char_attribute_table_to_put = ct;
            value_to_put = val;
            Fmap_char_attribute (Qput_char_table_map_function,
                                 XCHAR_TABLE_NAME (encoding_table),
                                 Qnil);
+           if ( CHARSETP (mother) )
+             {
+               struct chartab_range r;
+
+               r.type = CHARTAB_RANGE_CHARSET;
+               r.charset = mother;
+               put_char_table (ct, &r, val);
+             }
          }
 #if 0
        else
@@ -3211,16 +3222,16 @@ put_char_composition (Lisp_Object character, Lisp_Object value)
        {
          Emchar c = XINT (v);
          Lisp_Object ret
-           = Fget_char_attribute (make_char (c), Q_ucs_variants, Qnil);
+           = Fget_char_attribute (make_char (c), Q_ucs_unified, Qnil);
 
          if (!CONSP (ret))
            {
-             Fput_char_attribute (make_char (c), Q_ucs_variants,
+             Fput_char_attribute (make_char (c), Q_ucs_unified,
                                   Fcons (character, Qnil));
            }
          else if (NILP (Fmemq (character, ret)))
            {
-             Fput_char_attribute (make_char (c), Q_ucs_variants,
+             Fput_char_attribute (make_char (c), Q_ucs_unified,
                                   Fcons (character, ret));
            }
        }
@@ -3253,15 +3264,15 @@ Store CHARACTER's ATTRIBUTE with VALUE.
 
       c = XINT (value);
 
-      ret = Fget_char_attribute (make_char (c), Q_ucs_variants, Qnil);
+      ret = Fget_char_attribute (make_char (c), Q_ucs_unified, Qnil);
       if (!CONSP (ret))
        {
-         Fput_char_attribute (make_char (c), Q_ucs_variants,
+         Fput_char_attribute (make_char (c), Q_ucs_unified,
                               Fcons (character, Qnil));
        }
       else if (NILP (Fmemq (character, ret)))
        {
-         Fput_char_attribute (make_char (c), Q_ucs_variants,
+         Fput_char_attribute (make_char (c), Q_ucs_unified,
                               Fcons (character, ret));
        }
     }
@@ -4039,16 +4050,20 @@ word_boundary_p (Emchar c1, Emchar c2)
     c2 = cmpchar_component (c2, 0, 1);
 #endif
 
+#ifndef UTF2000
   if (EQ (CHAR_CHARSET (c1), CHAR_CHARSET (c2)))
+#endif
     {
       tail = Vword_separating_categories;
       default_result = 0;
     }
+#ifndef UTF2000
   else
     {
       tail = Vword_combining_categories;
       default_result = 1;
     }
+#endif
 
   category_set1 = CATEGORY_SET (c1);
   if (NILP (category_set1))
@@ -4084,7 +4099,7 @@ syms_of_chartab (void)
   defsymbol (&Qsystem_char_id,         "system-char-id");
 
   defsymbol (&Qto_ucs,                 "=>ucs");
-  defsymbol (&Q_ucs_variants,          "->ucs-variants");
+  defsymbol (&Q_ucs_unified,           "->ucs-unified");
   defsymbol (&Qcomposition,            "composition");
   defsymbol (&Q_decomposition,         "->decomposition");
   defsymbol (&Qcompat,                 "compat");