diff options
| author | Kenichi Handa | 2008-03-27 11:36:43 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-03-27 11:36:43 +0000 |
| commit | 880820fe8732e4384f5fbeb1998fa582e86e80cf (patch) | |
| tree | 250c4c2148120605db516c987c23b85063b5497d /src/charset.c | |
| parent | 5148e555c837cb8e6b6ada594f97bc34f9bc667c (diff) | |
| download | emacs-880820fe8732e4384f5fbeb1998fa582e86e80cf.tar.gz emacs-880820fe8732e4384f5fbeb1998fa582e86e80cf.zip | |
(Fdefine_charset_internal): Change the way of
registering charsets in Vcharset_order_list.
(syms_of_charset): Make the charset `eight-bit' supplementary.
Diffstat (limited to 'src/charset.c')
| -rw-r--r-- | src/charset.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/charset.c b/src/charset.c index 9c9395fdc65..ce15207b3ad 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -1058,8 +1058,29 @@ usage: (define-charset-internal ...) */) | |||
| 1058 | Vcharset_ordered_list = nconc2 (Vcharset_ordered_list, | 1058 | Vcharset_ordered_list = nconc2 (Vcharset_ordered_list, |
| 1059 | Fcons (make_number (id), Qnil)); | 1059 | Fcons (make_number (id), Qnil)); |
| 1060 | else | 1060 | else |
| 1061 | Vcharset_ordered_list = Fcons (make_number (id), | 1061 | { |
| 1062 | Vcharset_ordered_list); | 1062 | Lisp_Object tail; |
| 1063 | |||
| 1064 | for (tail = Vcharset_ordered_list; CONSP (tail); tail = XCDR (tail)) | ||
| 1065 | { | ||
| 1066 | struct charset *cs = CHARSET_FROM_ID (XINT (XCAR (tail))); | ||
| 1067 | |||
| 1068 | if (cs->supplementary_p) | ||
| 1069 | break; | ||
| 1070 | } | ||
| 1071 | if (EQ (tail, Vcharset_ordered_list)) | ||
| 1072 | Vcharset_ordered_list = Fcons (make_number (id), | ||
| 1073 | Vcharset_ordered_list); | ||
| 1074 | else if (NILP (tail)) | ||
| 1075 | Vcharset_ordered_list = nconc2 (Vcharset_ordered_list, | ||
| 1076 | Fcons (make_number (id), Qnil)); | ||
| 1077 | else | ||
| 1078 | { | ||
| 1079 | val = Fcons (XCAR (tail), XCDR (tail)); | ||
| 1080 | XSETCDR (tail, val); | ||
| 1081 | XSETCAR (tail, make_number (id)); | ||
| 1082 | } | ||
| 1083 | } | ||
| 1063 | charset_ordered_list_tick++; | 1084 | charset_ordered_list_tick++; |
| 1064 | } | 1085 | } |
| 1065 | 1086 | ||
| @@ -2161,7 +2182,7 @@ syms_of_charset () | |||
| 2161 | 0, MAX_UNICODE_CHAR, -1, 0, -1, 1, 0, 0); | 2182 | 0, MAX_UNICODE_CHAR, -1, 0, -1, 1, 0, 0); |
| 2162 | charset_eight_bit | 2183 | charset_eight_bit |
| 2163 | = define_charset_internal (Qeight_bit, 1, "\x80\xFF\x00\x00\x00\x00", | 2184 | = define_charset_internal (Qeight_bit, 1, "\x80\xFF\x00\x00\x00\x00", |
| 2164 | 128, 255, -1, 0, -1, 0, 0, | 2185 | 128, 255, -1, 0, -1, 0, 1, |
| 2165 | MAX_5_BYTE_CHAR + 1); | 2186 | MAX_5_BYTE_CHAR + 1); |
| 2166 | } | 2187 | } |
| 2167 | 2188 | ||