From d5910054468aae95f8ad1c9be4acdb2ba62270a2 Mon Sep 17 00:00:00 2001 From: tomo Date: Tue, 17 Dec 2002 16:52:17 +0000 Subject: [PATCH] Sync with r21-2-19-utf-2000-0_8-2-charset-alias. --- src/ChangeLog | 10 ++++++++++ src/mule-charset.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 434e00f..4247f7d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +1999-10-07 MORIOKA Tomohiko + + * mule-charset.c (Qvietnamese_viscii_lower): New variable. + (Qvietnamese_viscii_upper): New variable. + (Fdefine_charset_alias): New function. + (syms_of_mule_charset): Add new function `define-charset-alias'. + (syms_of_mule_charset): Rename charset `vietnamese-viscii-*' to + `latin-viscii-*'; define `vietnamese-viscii-*' as aliases for + `latin-viscii-*'. + 1999-10-04 MORIOKA Tomohiko * char-ucs.h (MIN_CHAR_OBS_94x94): New macro. diff --git a/src/mule-charset.c b/src/mule-charset.c index 5772f73..945549f 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -215,6 +215,8 @@ Lisp_Object Qascii, Qucs_bmp, Qlatin_viscii_lower, Qlatin_viscii_upper, + Qvietnamese_viscii_lower, + Qvietnamese_viscii_upper, Qhiragana_jisx0208, Qkatakana_jisx0208, #endif @@ -1244,6 +1246,16 @@ NEW-NAME is the name of the new charset. Return the new charset. return new_charset; } +DEFUN ("define-charset-alias", Fdefine_charset_alias, 2, 2, 0, /* +Define symbol ALIAS as an alias for CHARSET. +*/ + (alias, charset)) +{ + CHECK_SYMBOL (alias); + charset = Fget_charset (charset); + return Fputhash (alias, charset, Vcharset_hash_table); +} + /* #### Reverse direction charsets not yet implemented. */ #if 0 DEFUN ("charset-reverse-direction-charset", Fcharset_reverse_direction_charset, @@ -1678,6 +1690,7 @@ syms_of_mule_charset (void) DEFSUBR (Fmake_charset); DEFSUBR (Fmake_reverse_direction_charset); /* DEFSUBR (Freverse_direction_charset); */ + DEFSUBR (Fdefine_charset_alias); DEFSUBR (Fcharset_from_attributes); DEFSUBR (Fcharset_short_name); DEFSUBR (Fcharset_long_name); @@ -1739,8 +1752,10 @@ syms_of_mule_charset (void) defsymbol (&Qchinese_cns11643_2, "chinese-cns11643-2"); #ifdef UTF2000 defsymbol (&Qucs_bmp, "ucs-bmp"); - defsymbol (&Qlatin_viscii_lower, "vietnamese-viscii-lower"); - defsymbol (&Qlatin_viscii_upper, "vietnamese-viscii-upper"); + defsymbol (&Qlatin_viscii_lower, "latin-viscii-lower"); + defsymbol (&Qlatin_viscii_upper, "latin-viscii-upper"); + defsymbol (&Qvietnamese_viscii_lower, "vietnamese-viscii-lower"); + defsymbol (&Qvietnamese_viscii_upper, "vietnamese-viscii-upper"); defsymbol (&Qhiragana_jisx0208, "hiragana-jisx0208"); defsymbol (&Qkatakana_jisx0208, "katakana-jisx0208"); #endif @@ -2078,6 +2093,16 @@ complex_vars_of_mule_charset (void) build_string ("VISCII upper (Vietnamese)"), build_string ("VISCII1\\.1"), Qnil, 0, 0, 0, 32); + /* + Fputhash (Qvietnamese_viscii_lower, Vcharset_latin_viscii_lower, + Vcharset_hash_table); + Fputhash (Qvietnamese_viscii_upper, Vcharset_latin_viscii_upper, + Vcharset_hash_table); + */ + Fdefine_charset_alias (Qvietnamese_viscii_lower, + Vcharset_latin_viscii_lower); + Fdefine_charset_alias (Qvietnamese_viscii_upper, + Vcharset_latin_viscii_upper); staticpro (&Vcharset_hiragana_jisx0208); Vcharset_hiragana_jisx0208 = make_charset (LEADING_BYTE_HIRAGANA_JISX0208, Qhiragana_jisx0208, -- 1.7.10.4