Sync with r21-4-5-utf-2000-0_19-3. r21-4-6-utf-2000 remote_mirror_ddb31ee2e2b677da7979f9e63d5d4e8f/r21-4-6-utf-2000 r21-4-6-utf-2000-0_19-new-case-jc3-3
authortomo <tomo>
Fri, 6 Sep 2002 08:54:13 +0000 (08:54 +0000)
committertomo <tomo>
Fri, 6 Sep 2002 08:54:13 +0000 (08:54 +0000)
lisp/ChangeLog
lisp/iso8859-1.el
src/ChangeLog
src/casetab.c
src/chartab.c
src/chartab.h

index 1c8bf92..921fafa 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-26  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
+
+       * iso8859-1.el: Don't set `iso8859/1-case-table' to the
+       standard-case-table in UTF-2000.
+
 2002-08-20  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
 
        * mule/mule-coding.el (coded-charset-entity-reference-alist): Add
index 01a15eb..37ed71e 100644 (file)
   )
 
 \f
+(unless (featurep 'utf-2000)
 (defconst iso8859/1-case-table nil
   "The case table for ISO-8859/1 characters.")
 
  )
 
 (set-standard-case-table (mapcar 'copy-sequence iso8859/1-case-table))
+)
 
 (setq-default ctl-arrow 'iso-8859/1)
 
index 4c5c374..f26fc7d 100644 (file)
@@ -1,3 +1,22 @@
+2002-08-26  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
+
+       * chartab.h: Add extern declarations for Qdowncase, Qflippedcase,
+       Q_lowercase, Q_uppercase in UTF-2000.
+
+       * chartab.c (get_char_table): Add special code for the standard
+       case table to use character attribute `->downcase' and
+       `->uppercase' for case operations in UTF-2000.
+
+       * casetab.c (Qflippedcase): New variable in UTF-2000.
+       (Q_lowercase): Likewise.
+       (Q_uppercase): Likewise.
+       (syms_of_casetab): Add new symbols `flippedcase', `->lowercase'
+       and `->uppercase' in UTF-2000.
+       (complex_vars_of_casetab): Assign attribute name `downcase' to
+       downcase and CANON table of Vstandard_case_table in UTF-2000;
+       assign attribute name `flippedcase' to upcase and EQV table of
+       Vstandard_case_table in UTF-2000.
+
 2002-08-20  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
 
        * text-coding.c (decode_add_er_char): Support isolated-chars.
index 656a592..de0b31a 100644 (file)
@@ -1,6 +1,7 @@
 /* XEmacs routines to deal with case tables.
    Copyright (C) 1987, 1992, 1993, 1994 Free Software Foundation, Inc.
    Copyright (C) 1995 Sun Microsystems, Inc.
+   Copyright (C) 2002 MORIOKA Tomohiko
 
 This file is part of XEmacs.
 
@@ -29,6 +30,7 @@ Boston, MA 02111-1307, USA.  */
    distribution file chartab.c for details. */
 
 /* Modified for Mule by Ben Wing. */
+/* Modified for UTF-2000 by MORIOKA Tomohiko */
 
 /* Case table consists of four char-table.  Those are for downcase,
    upcase, canonical and equivalent respectively.
@@ -50,6 +52,9 @@ Boston, MA 02111-1307, USA.  */
 
 Lisp_Object Qcase_tablep, Qdowncase, Qupcase;
 Lisp_Object Vstandard_case_table;
+#ifdef UTF2000
+Lisp_Object Qflippedcase, Q_lowercase, Q_uppercase;
+#endif
 
 static void compute_trt_inverse (Lisp_Object trt, Lisp_Object inverse);
 Lisp_Object case_table_char (Lisp_Object ch, Lisp_Object table);
@@ -450,6 +455,11 @@ syms_of_casetab (void)
   defsymbol (&Qcase_tablep, "case-table-p");
   defsymbol (&Qdowncase, "downcase");
   defsymbol (&Qupcase, "upcase");
+#ifdef UTF2000
+  defsymbol (&Qflippedcase, "flippedcase");
+  defsymbol (&Q_lowercase, "->lowercase");
+  defsymbol (&Q_uppercase, "->uppercase");
+#endif
 
   DEFSUBR (Fcase_table_p);
   DEFSUBR (Fget_case_table);
@@ -472,7 +482,14 @@ complex_vars_of_casetab (void)
 
   Vstandard_case_table = allocate_case_table ();
 
+#ifdef UTF2000
   tem = MAKE_TRT_TABLE ();
+#ifdef HAVE_DATABASE
+  XCHAR_TABLE_NAME (tem) = Qdowncase;
+#endif
+#else
+  tem = MAKE_TRT_TABLE ();
+#endif
   XSET_CASE_TABLE_DOWNCASE (Vstandard_case_table, tem);
   XSET_CASE_TABLE_CANON (Vstandard_case_table, tem);
 
@@ -485,7 +502,14 @@ complex_vars_of_casetab (void)
       SET_TRT_TABLE_CHAR_1 (tem, i, lowered);
     }
 
+#ifdef UTF2000
+  tem = MAKE_TRT_TABLE ();
+#ifdef HAVE_DATABASE
+  XCHAR_TABLE_NAME (tem) = Qflippedcase;
+#endif
+#else
   tem = MAKE_TRT_TABLE ();
+#endif
   XSET_CASE_TABLE_UPCASE (Vstandard_case_table, tem);
   XSET_CASE_TABLE_EQV (Vstandard_case_table, tem);
 
index 1a22127..ed78ba6 100644 (file)
@@ -2061,7 +2061,26 @@ Lisp_Object
 get_char_table (Emchar ch, Lisp_Char_Table *ct)
 {
 #ifdef UTF2000
-  return get_char_id_table (ct, ch);
+  {
+    Lisp_Object ret = get_char_id_table (ct, ch);
+
+#ifdef HAVE_DATABASE
+    if (NILP (ret))
+      {
+       if (EQ (CHAR_TABLE_NAME (ct), Qdowncase))
+         ret = Fget_char_attribute (make_char (ch), Q_lowercase, Qnil);
+       else if (EQ (CHAR_TABLE_NAME (ct), Qflippedcase))
+         ret = Fget_char_attribute (make_char (ch), Q_uppercase, Qnil);
+       if (CONSP (ret))
+         {
+           ret = XCAR (ret);
+           if (CONSP (ret))
+             ret = Ffind_char (ret);
+         }
+      }
+#endif
+    return ret;
+  }
 #elif defined(MULE)
   {
     Lisp_Object charset;
index e6d637b..9929b1f 100644 (file)
@@ -42,6 +42,8 @@ EXFUN (Fput_char_attribute, 3);
 
 EXFUN (Ffind_char, 1);
 
+extern Lisp_Object Qdowncase, Qflippedcase, Q_lowercase, Q_uppercase;
+
 
 /************************************************************************/
 /*                         Char-ID Tables                              */