From 1c1e8481d8464d9221f57c28d4efa5617536f564 Mon Sep 17 00:00:00 2001 From: tomo Date: Wed, 28 Aug 2002 17:47:15 +0000 Subject: [PATCH] Merge r21-4-0-utf-2000-0_19-new-case. --- lisp/ChangeLog | 5 +++++ lisp/iso8859-1.el | 2 ++ src/ChangeLog | 19 +++++++++++++++++++ src/casetab.c | 24 ++++++++++++++++++++++++ src/chartab.c | 21 ++++++++++++++++++++- src/chartab.h | 2 ++ 6 files changed, 72 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 88b2119..84bf807 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 1fca91e..595e63f 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 */ -- 1.7.10.4