From: tomo Date: Fri, 6 Sep 2002 08:54:13 +0000 (+0000) Subject: Sync with r21-4-5-utf-2000-0_19-3. X-Git-Tag: r21-4-6-utf-2000-0_19-new-case-jc3-3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed429c9d6ed9863c9db77c52ffa58990c411a481;p=chise%2Fxemacs-chise.git Sync with r21-4-5-utf-2000-0_19-3. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c8bf92..921fafa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-08-26 MORIOKA Tomohiko + + * iso8859-1.el: Don't set `iso8859/1-case-table' to the + standard-case-table in UTF-2000. + 2002-08-20 MORIOKA Tomohiko * mule/mule-coding.el (coded-charset-entity-reference-alist): Add diff --git a/lisp/iso8859-1.el b/lisp/iso8859-1.el index 01a15eb..37ed71e 100644 --- a/lisp/iso8859-1.el +++ b/lisp/iso8859-1.el @@ -142,6 +142,7 @@ ) +(unless (featurep 'utf-2000) (defconst iso8859/1-case-table nil "The case table for ISO-8859/1 characters.") @@ -198,6 +199,7 @@ ) (set-standard-case-table (mapcar 'copy-sequence iso8859/1-case-table)) +) (setq-default ctl-arrow 'iso-8859/1) diff --git a/src/ChangeLog b/src/ChangeLog index 4c5c374..f26fc7d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,22 @@ +2002-08-26 MORIOKA Tomohiko + + * 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 * text-coding.c (decode_add_er_char): Support isolated-chars. diff --git a/src/casetab.c b/src/casetab.c index 656a592..de0b31a 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -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); diff --git a/src/chartab.c b/src/chartab.c index 1a22127..ed78ba6 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -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; diff --git a/src/chartab.h b/src/chartab.h index e6d637b2..9929b1f 100644 --- a/src/chartab.h +++ b/src/chartab.h @@ -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 */