From: tomo Date: Sat, 5 Apr 2003 11:11:20 +0000 (+0000) Subject: Sync up with r21-4-11-chise-0_20-5. X-Git-Tag: r21-2-44-utf-2000-m0_18-n0_21-5~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=35b3dfc7dc10846b17e5c5472b8c513f7cb66110;p=chise%2Fxemacs-chise.git.1 Sync up with r21-4-11-chise-0_20-5. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7d8b51c..4b6d40e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2003-04-03 MORIOKA Tomohiko + + * mule/mule-conf.el (chinese-isoir165): Specify iso-ir 165. + (chinese-cns11643-3): Specify iso-ir 183. + (chinese-cns11643-4): Specify iso-ir 184. + (chinese-cns11643-5): Specify iso-ir 185. + (chinese-cns11643-6): Specify iso-ir 186. + (chinese-cns11643-7): Specify iso-ir 187. + (=jis-x0213-1-2000): In XEmacs CHISE, specify iso-ir 228. + (=jis-x0213-2-2000): In XEmacs CHISE, specify iso-ir 229. + +2003-04-03 MORIOKA Tomohiko + + * bytecomp.el (byte-compile-insert-header): In XEmacs CHISE, check + \uXXXX for every cases. + 2003-03-31 MORIOKA Tomohiko * mule/mule-conf.el (=ucs@big5): Renamed from `ucs-big5'. diff --git a/lisp/bytecomp.el b/lisp/bytecomp.el index 2360def..f5c527f 100644 --- a/lisp/bytecomp.el +++ b/lisp/bytecomp.el @@ -1822,7 +1822,11 @@ With argument, insert value in current buffer after the form." (if (and (featurep 'utf-2000) (re-search-backward "\\\\u[0-9A-Fa-f]+" nil t)) 'utf-8-unix - 'binary)))) + 'binary) + (when (featurep 'utf-2000) + (goto-char (point-min)) + (if (re-search-forward "\\\\u[0-9A-Fa-f]+" nil t) + 'utf-8-mcs-unix))))) (setq ces 'binary)) (if (eq ces 'binary) (setq buffer-file-coding-system 'binary) diff --git a/lisp/mule/mule-conf.el b/lisp/mule/mule-conf.el index 291d627..a68ef82 100644 --- a/lisp/mule/mule-conf.el +++ b/lisp/mule/mule-conf.el @@ -66,7 +66,8 @@ (make-charset 'chinese-isoir165 "ISO-IR-165 (CCITT Extended GB; Chinese simplified)" - `(registry "isoir165" + `(iso-ir 165 + registry "isoir165" dimension 2 chars 94 final ?E @@ -80,21 +81,22 @@ (flet ((make-chinese-cns11643-charset - (name plane final) + (name iso-ir plane final) (make-charset name (concat "CNS 11643 Plane " plane " (Chinese traditional)") - `(registry + `(iso-ir ,iso-ir + registry ,(concat "CNS11643[.-]\\(.*[.-]\\)?" plane "$") dimension 2 chars 94 final ,final graphic 0)) )) - (make-chinese-cns11643-charset 'chinese-cns11643-3 "3" ?I) - (make-chinese-cns11643-charset 'chinese-cns11643-4 "4" ?J) - (make-chinese-cns11643-charset 'chinese-cns11643-5 "5" ?K) - (make-chinese-cns11643-charset 'chinese-cns11643-6 "6" ?L) - (make-chinese-cns11643-charset 'chinese-cns11643-7 "7" ?M) + (make-chinese-cns11643-charset 'chinese-cns11643-3 183 "3" ?I) + (make-chinese-cns11643-charset 'chinese-cns11643-4 184 "4" ?J) + (make-chinese-cns11643-charset 'chinese-cns11643-5 185 "5" ?K) + (make-chinese-cns11643-charset 'chinese-cns11643-6 186 "6" ?L) + (make-chinese-cns11643-charset 'chinese-cns11643-7 187 "7" ?M) ) ;; JIS X 0213:2000 @@ -103,20 +105,22 @@ (make-charset '=jis-x0213-1-2000 "JIS X 0213:2000 Plain 1" - '(registry "jisx0213\\(\\.2000\\)-1" - dimension 2 - chars 94 - mother =jis-x0208-1990 - final ?O - graphic 0)) + '(iso-ir 228 + registry "jisx0213\\(\\.2000\\)-1" + dimension 2 + chars 94 + mother =jis-x0208-1990 + final ?O + graphic 0)) (make-charset '=jis-x0213-2-2000 "JIS X 0213:2000 Plain 2" - '(registry "jisx0213\\(\\.2000\\)-2" - dimension 2 - chars 94 - final ?P - graphic 0)) + '(iso-ir 229 + registry "jisx0213\\(\\.2000\\)-2" + dimension 2 + chars 94 + final ?P + graphic 0)) (define-charset-alias 'japanese-jisx0213-1 '=jis-x0213-1-2000) (define-charset-alias 'japanese-jisx0213-2 '=jis-x0213-2-2000) ) diff --git a/src/ChangeLog b/src/ChangeLog index 80fa18e..92cd117 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,28 @@ +2003-04-04 MORIOKA Tomohiko + + * chartab.c (decode_char_table_range): CHARTAB_RANGE_DEFAULT is + only for XEmacs CHISE. + +2003-04-03 MORIOKA Tomohiko + + * char-ucs.h: Compact non-ISO-IR charset-ids. + (LEADING_BYTE_UCS): Changed to -177. + (LEADING_BYTE_CONTROL_1): Changed to -77. + (LEADING_BYTE_UCS_BMP): Changed to -176. + (LEADING_BYTE_JAPANESE_JISX0208_1990): Changed to -168. + +2003-04-03 MORIOKA Tomohiko + + * mule-charset.c (Qiso_ir): New variable. + (Fmake_charset): Recognise new property `iso-ir'. + (syms_of_mule_charset): Add new symbol `iso-ir'. + +2003-04-02 MORIOKA Tomohiko + + * char-ucs.h: Change charset-id of ISO-IR sets from ISO-IR-number + n to -n; charset-id of non ISO-IR sets are changed to positive + numbers. + 2003-03-09 MORIOKA Tomohiko * mule-charset.c (put_char_ccs_code_point): Refer `=ucs' instead diff --git a/src/char-ucs.h b/src/char-ucs.h index ab4f3e7..c8d9ea5 100644 --- a/src/char-ucs.h +++ b/src/char-ucs.h @@ -59,150 +59,143 @@ Lisp_Object remove_char_ccs (Lisp_Object character, Lisp_Object ccs); typedef short Charset_ID; -#define MIN_LEADING_BYTE -0x200 - /* ISO/IEC 10646 */ -#define LEADING_BYTE_UCS (MIN_LEADING_BYTE + 1) +#define LEADING_BYTE_UCS -177 /* represent normal 80-9F */ -#define LEADING_BYTE_CONTROL_1 (MIN_LEADING_BYTE + 2) +#define LEADING_BYTE_CONTROL_1 -77 /* ISO/IEC 10646 BMP */ -#define LEADING_BYTE_UCS_BMP (MIN_LEADING_BYTE + 3) +#define LEADING_BYTE_UCS_BMP -176 /* ISO/IEC 10646 SMP */ -#define LEADING_BYTE_UCS_SMP (MIN_LEADING_BYTE + 4) +#define LEADING_BYTE_UCS_SMP 1 /* ISO/IEC 10646 SIP */ -#define LEADING_BYTE_UCS_SIP (MIN_LEADING_BYTE + 5) +#define LEADING_BYTE_UCS_SIP 2 /* Japanese JIS X0208 Common 2/4 2/{(8),9,10,11} 4/2 (B) */ -#define LEADING_BYTE_JIS_X0208 (MIN_LEADING_BYTE + 11) - -/* Japanese JIS X0208-1990 2/4 2/{(8),9,10,11} 4/2 (B) */ -#define LEADING_BYTE_JAPANESE_JISX0208_1990 (MIN_LEADING_BYTE + 12) +#define LEADING_BYTE_JIS_X0208 3 /* Chinese GB 12345-1990 */ -#define LEADING_BYTE_CHINESE_GB12345 (MIN_LEADING_BYTE + 13) +#define LEADING_BYTE_CHINESE_GB12345 4 -#define LEADING_BYTE_CHINESE_BIG5 (MIN_LEADING_BYTE + 20) +#define LEADING_BYTE_CHINESE_BIG5 5 /* Big5 Level 1 2/4 2/{(8),9,10,11} 4/0 '0' */ -#define LEADING_BYTE_CHINESE_BIG5_1 (MIN_LEADING_BYTE + 21) +#define LEADING_BYTE_CHINESE_BIG5_1 6 /* Big5 Level 2 2/4 2/{(8),9,10,11} 4/0 '1' */ -#define LEADING_BYTE_CHINESE_BIG5_2 (MIN_LEADING_BYTE + 22) +#define LEADING_BYTE_CHINESE_BIG5_2 7 /* VISCII 1.1 */ -#define LEADING_BYTE_LATIN_VISCII (MIN_LEADING_BYTE + 24) +#define LEADING_BYTE_LATIN_VISCII 8 /* MULE VISCII-LOWER (CHARSET_ID_OFFSET_96 + '1') */ -#define LEADING_BYTE_LATIN_VISCII_LOWER (MIN_LEADING_BYTE + 25) +#define LEADING_BYTE_LATIN_VISCII_LOWER 9 /* MULE VISCII-UPPER (CHARSET_ID_OFFSET_96 + '2') */ -#define LEADING_BYTE_LATIN_VISCII_UPPER (MIN_LEADING_BYTE + 26) +#define LEADING_BYTE_LATIN_VISCII_UPPER 10 -#define LEADING_BYTE_ETHIOPIC_UCS (MIN_LEADING_BYTE + 27) +#define LEADING_BYTE_ETHIOPIC_UCS 11 -#define MIN_LEADING_BYTE_PRIVATE (MIN_LEADING_BYTE + 97) -#define MAX_LEADING_BYTE_PRIVATE -1 +#define MIN_LEADING_BYTE_PRIVATE 12 +#define MAX_LEADING_BYTE_PRIVATE 512 /* ISO 646 IRV */ -#define LEADING_BYTE_ASCII 6 /* (CHARSET_ID_OFFSET_94 + 'B') */ +#define LEADING_BYTE_ASCII -6 /* (CHARSET_ID_OFFSET_94 + 'B') */ /* Right half of JIS X0201-1976 */ -#define LEADING_BYTE_KATAKANA_JISX0201 13 /* (CHARSET_ID_OFFSET_94 + 'I') */ +#define LEADING_BYTE_KATAKANA_JISX0201 -13 /* (CHARSET_ID_OFFSET_94 + 'I') */ /* Left half of JIS X0201-1976 */ -#define LEADING_BYTE_LATIN_JISX0201 14 /* (CHARSET_ID_OFFSET_94 + 'J') */ +#define LEADING_BYTE_LATIN_JISX0201 -14 /* (CHARSET_ID_OFFSET_94 + 'J') */ -/* #define CHARSET_ID_OFFSET_96 (CHARSET_ID_OFFSET_94 + 80) */ - /* Right half of ISO 8859-1 */ -#define LEADING_BYTE_LATIN_ISO8859_1 100 /* (CHARSET_ID_OFFSET_96 + 'A') */ +#define LEADING_BYTE_LATIN_ISO8859_1 -100 /* (CHARSET_ID_OFFSET_96 + 'A') */ /* Right half of ISO 8859-2 */ -#define LEADING_BYTE_LATIN_ISO8859_2 101 /* (CHARSET_ID_OFFSET_96 + 'B') */ +#define LEADING_BYTE_LATIN_ISO8859_2 -101 /* (CHARSET_ID_OFFSET_96 + 'B') */ /* Right half of ISO 8859-3 */ -#define LEADING_BYTE_LATIN_ISO8859_3 109 /* (CHARSET_ID_OFFSET_96 + 'C') */ +#define LEADING_BYTE_LATIN_ISO8859_3 -109 /* (CHARSET_ID_OFFSET_96 + 'C') */ /* Right half of ISO 8859-4 */ -#define LEADING_BYTE_LATIN_ISO8859_4 110 /* (CHARSET_ID_OFFSET_96 + 'D') */ +#define LEADING_BYTE_LATIN_ISO8859_4 -110 /* (CHARSET_ID_OFFSET_96 + 'D') */ /* Right half of ISO 8859-7 */ -#define LEADING_BYTE_GREEK_ISO8859_7 126 /* (CHARSET_ID_OFFSET_96 + 'F') */ +#define LEADING_BYTE_GREEK_ISO8859_7 -126 /* (CHARSET_ID_OFFSET_96 + 'F') */ /* Right half of ISO 8859-6 */ -#define LEADING_BYTE_ARABIC_ISO8859_6 127 /* (CHARSET_ID_OFFSET_96 + 'G') */ +#define LEADING_BYTE_ARABIC_ISO8859_6 -127 /* (CHARSET_ID_OFFSET_96 + 'G') */ /* Right half of ISO 8859-8 */ -#define LEADING_BYTE_HEBREW_ISO8859_8 138 /* (CHARSET_ID_OFFSET_96 + 'H') */ +#define LEADING_BYTE_HEBREW_ISO8859_8 -138 /* (CHARSET_ID_OFFSET_96 + 'H') */ /* Right half of ISO 8859-5 */ -#define LEADING_BYTE_CYRILLIC_ISO8859_5 144 /* (CHARSET_ID_OFFSET_96 + 'L') */ +#define LEADING_BYTE_CYRILLIC_ISO8859_5 -144 /* (CHARSET_ID_OFFSET_96 + 'L') */ /* Right half of ISO 8859-9 */ -#define LEADING_BYTE_LATIN_ISO8859_9 148 /* (CHARSET_ID_OFFSET_96 + 'M') */ +#define LEADING_BYTE_LATIN_ISO8859_9 -148 /* (CHARSET_ID_OFFSET_96 + 'M') */ /* TIS620-2533 */ -#define LEADING_BYTE_THAI_TIS620 166 /* (CHARSET_ID_OFFSET_96 + 'T') */ +#define LEADING_BYTE_THAI_TIS620 -166 /* (CHARSET_ID_OFFSET_96 + 'T') */ /* Right-hand Part of the VSCII-2 (TCVN 5712:1983) */ -#define LEADING_BYTE_LATIN_TCVN5712 180 /* F = 5/10 0x5A `Z' */ - +#define LEADING_BYTE_LATIN_TCVN5712 -180 /* F = 5/10 0x5A `Z' */ -/* #define CHARSET_ID_OFFSET_94x94 (CHARSET_ID_OFFSET_96 + 80) */ - -/* #define MIN_LEADING_BYTE_PRIVATE_2 ('0' + CHARSET_ID_OFFSET_94x94) */ -/* #define MAX_LEADING_BYTE_PRIVATE_2 ('?' + CHARSET_ID_OFFSET_94x94) */ /* Japanese JIS X0208-1978 2/4 2/{(8),9,10,11} 4/0 (@) */ -#define LEADING_BYTE_JAPANESE_JISX0208_1978 42 +#define LEADING_BYTE_JAPANESE_JISX0208_1978 -42 /* Chinese Hanzi GB2312-1980 2/4 2/{(8),9,10,11} 4/1 (A) */ -#define LEADING_BYTE_CHINESE_GB2312 58 +#define LEADING_BYTE_CHINESE_GB2312 -58 /* Japanese JIS X0208-1983 2/4 2/{(8),9,10,11} 4/2 (B) */ -#define LEADING_BYTE_JAPANESE_JISX0208 87 +#define LEADING_BYTE_JAPANESE_JISX0208 -87 + +/* Japanese JIS X0208-1990 2/4 2/{(8),9,10,11} 4/2 (B) */ +#define LEADING_BYTE_JAPANESE_JISX0208_1990 -168 /* Hangul KS C5601-1987 2/4 2/{8,9,10,11} 4/3 (C) */ -#define LEADING_BYTE_KOREAN_KSC5601 149 +#define LEADING_BYTE_KOREAN_KSC5601 -149 /* Japanese JIS X0212-1990 2/4 2/{8,9,10,11} 4/4 (D) */ -#define LEADING_BYTE_JAPANESE_JISX0212 159 +#define LEADING_BYTE_JAPANESE_JISX0212 -159 /* CCITT Extended GB 2/4 2/{8,9,10,11} 4/5 (E) */ -#define LEADING_BYTE_CHINESE_CCITT_GB 165 +#define LEADING_BYTE_CHINESE_CCITT_GB -165 /* Chinese CNS11643 Set 1 2/4 2/{8,9,10,11} 4/7 (G) */ -#define LEADING_BYTE_CHINESE_CNS11643_1 171 +#define LEADING_BYTE_CHINESE_CNS11643_1 -171 /* Chinese CNS11643 Set 2 2/4 2/{8,9,10,11} 4/8 (H) */ -#define LEADING_BYTE_CHINESE_CNS11643_2 172 +#define LEADING_BYTE_CHINESE_CNS11643_2 -172 /* Chinese CNS11643 Set 3 2/4 2/{8,9,10,11} 4/9 (I) */ -#define LEADING_BYTE_CHINESE_CNS11643_3 183 +#define LEADING_BYTE_CHINESE_CNS11643_3 -183 /* Chinese CNS11643 Set 4 2/4 2/{8,9,10,11} 4/10 (J) */ -#define LEADING_BYTE_CHINESE_CNS11643_4 184 +#define LEADING_BYTE_CHINESE_CNS11643_4 -184 /* Chinese CNS11643 Set 5 2/4 2/{8,9,10,11} 4/11 (K) */ -#define LEADING_BYTE_CHINESE_CNS11643_5 185 +#define LEADING_BYTE_CHINESE_CNS11643_5 -185 /* Chinese CNS11643 Set 6 2/4 2/{8,9,10,11} 4/12 (L) */ -#define LEADING_BYTE_CHINESE_CNS11643_6 186 +#define LEADING_BYTE_CHINESE_CNS11643_6 -186 /* Chinese CNS11643 Set 7 2/4 2/{8,9,10,11} 4/13 (M) */ -#define LEADING_BYTE_CHINESE_CNS11643_7 187 +#define LEADING_BYTE_CHINESE_CNS11643_7 -187 /* DPRK Hangul KPS 9566-1997 2/4 2/{8,9,10,11} 4/14 (N) */ -#define LEADING_BYTE_KOREAN_KPS9566 202 +#define LEADING_BYTE_KOREAN_KPS9566 -202 + +#define MIN_LEADING_BYTE (- 80 * 3) -#define NUM_LEADING_BYTES (80 * 3 - MIN_LEADING_BYTE) +#define NUM_LEADING_BYTES (MAX_LEADING_BYTE_PRIVATE - MIN_LEADING_BYTE) /************************************************************************/ diff --git a/src/chartab.c b/src/chartab.c index c1cce38..2f5c6b5 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -1740,8 +1740,10 @@ decode_char_table_range (Lisp_Object range, struct chartab_range *outrange) { if (EQ (range, Qt)) outrange->type = CHARTAB_RANGE_ALL; +#ifdef UTF2000 else if (EQ (range, Qnil)) outrange->type = CHARTAB_RANGE_DEFAULT; +#endif else if (CHAR_OR_CHAR_INTP (range)) { outrange->type = CHARTAB_RANGE_CHAR; diff --git a/src/mule-charset.c b/src/mule-charset.c index 9399ee4..b5e29cd 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -274,6 +274,7 @@ Lisp_Object Qdirection; Lisp_Object Qreverse_direction_charset; Lisp_Object Qleading_byte; Lisp_Object Qshort_name, Qlong_name; +Lisp_Object Qiso_ir; #ifdef UTF2000 Lisp_Object Qmin_code, Qmax_code, Qcode_offset; Lisp_Object Qmother, Qconversion, Q94x60, Q94x94x60; @@ -1409,7 +1410,7 @@ character set. Recognized properties are: */ (name, doc_string, props)) { - int id, dimension = 1, chars = 94, graphic = 0, final = 0, columns = -1; + int id = 0, dimension = 1, chars = 94, graphic = 0, final = 0, columns = -1; int direction = CHARSET_LEFT_TO_RIGHT; Lisp_Object registry = Qnil; Lisp_Object charset; @@ -1443,6 +1444,14 @@ character set. Recognized properties are: long_name = value; } + else if (EQ (keyword, Qiso_ir)) + { +#ifdef UTF2000 + CHECK_INT (value); + id = - XINT (value); +#endif + } + else if (EQ (keyword, Qdimension)) { CHECK_INT (value); @@ -1580,7 +1589,8 @@ character set. Recognized properties are: error ("Character set already defined for this DIMENSION/CHARS/FINAL combo"); - id = get_unallocated_leading_byte (dimension); + if (id == 0) + id = get_unallocated_leading_byte (dimension); if (NILP (doc_string)) doc_string = build_string (""); @@ -2332,6 +2342,7 @@ syms_of_mule_charset (void) defsymbol (&Qreverse_direction_charset, "reverse-direction-charset"); defsymbol (&Qshort_name, "short-name"); defsymbol (&Qlong_name, "long-name"); + defsymbol (&Qiso_ir, "iso-ir"); #ifdef UTF2000 defsymbol (&Qmother, "mother"); defsymbol (&Qmin_code, "min-code");