Andrew Choi <akochoi@i-cable.com>
[bpt/emacs.git] / lisp / international / mule-conf.el
CommitLineData
08c19a27
KH
1;;; mule-conf.el --- configure multilingual environment
2
08c19a27 3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
fa526c4a 4;; Licensed to the Free Software Foundation.
08c19a27
KH
5
6;; Keywords: mule, multilingual, character set, coding system
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option)
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to the
22;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23;; Boston, MA 02111-1307, USA.
24
25;;; Commentary:
26
27;; Don't byte-compile this file.
28
29;;; Code:
30
31;;; Definitions of character sets.
32
33;; Basic (official) character sets. These character sets are treated
7a860cf2 34;; efficiently with respect to buffer memory.
08c19a27
KH
35
36;; Syntax:
37;; (define-charset CHARSET-ID CHARSET
38;; [ DIMENSION CHARS WIDTH DIRECTION ISO-FINAL-CHAR ISO-GRAPHIC-PLANE
39;; SHORT-NAME LONG-NAME DESCRIPTION ])
40;; ASCII charset is defined in src/charset.c as below.
41;; (define-charset 0 ascii
42;; [1 94 1 0 ?B 0 "ASCII" "ASCII" "ASCII (ISO646 IRV)"])
43
7153b1f1
KH
44;; 1-byte charsets. Valid range of CHARSET-ID is 128..143.
45
46;; CHARSET-ID 128 is not used.
47
08c19a27 48(define-charset 129 'latin-iso8859-1
cead26f6
KH
49 [1 96 1 0 ?A 1 "RHP of Latin-1" "RHP of Latin-1 (ISO 8859-1): ISO-IR-100"
50 "Right-Hand Part of Latin Alphabet 1 (ISO/IEC 8859-1): ISO-IR-100"])
08c19a27 51(define-charset 130 'latin-iso8859-2
cead26f6
KH
52 [1 96 1 0 ?B 1 "RHP of Latin-2" "RHP of Latin-2 (ISO 8859-2): ISO-IR-101"
53 "Right-Hand Part of Latin Alphabet 2 (ISO/IEC 8859-2): ISO-IR-101"])
08c19a27 54(define-charset 131 'latin-iso8859-3
cead26f6
KH
55 [1 96 1 0 ?C 1 "RHP of Latin-3" "RHP of Latin-3 (ISO 8859-3): ISO-IR-109"
56 "Right-Hand Part of Latin Alphabet 3 (ISO/IEC 8859-3): ISO-IR-109"])
08c19a27 57(define-charset 132 'latin-iso8859-4
cead26f6
KH
58 [1 96 1 0 ?D 1 "RHP of Latin-4" "RHP of Latin-4 (ISO 8859-4): ISO-IR-110"
59 "Right-Hand Part of Latin Alphabet 4 (ISO/IEC 8859-4): ISO-IR-110"])
08c19a27 60(define-charset 133 'thai-tis620
cead26f6
KH
61 [1 96 1 0 ?T 1 "RHP of TIS620" "RHP of Thai (TIS620): ISO-IR-166"
62 "Right-Hand Part of TIS620.2533 (Thai): ISO-IR-166"])
08c19a27 63(define-charset 134 'greek-iso8859-7
cead26f6
KH
64 [1 96 1 0 ?F 1 "RHP of ISO8859/7" "RHP of Greek (ISO 8859-7): ISO-IR-126"
65 "Right-Hand Part of Latin/Greek Alphabet (ISO/IEC 8859-7): ISO-IR-126"])
08c19a27 66(define-charset 135 'arabic-iso8859-6
cead26f6 67 [1 96 1 1 ?G 1 "RHP of ISO8859/6" "RHP of Arabic (ISO 8859-6): ISO-IR-127"
0e6652f0 68 "Right-Hand Part of Latin/Arabic Alphabet (ISO/IEC 8859-6): ISO-IR-127"])
08c19a27 69(define-charset 136 'hebrew-iso8859-8
cead26f6
KH
70 [1 96 1 1 ?H 1 "RHP of ISO8859/8" "RHP of Hebrew (ISO 8859-8): ISO-IR-138"
71 "Right-Hand Part of Latin/Hebrew Alphabet (ISO/IEC 8859-8): ISO-IR-138"])
08c19a27 72(define-charset 137 'katakana-jisx0201
cead26f6
KH
73 [1 94 1 0 ?I 1 "JISX0201 Katakana" "Japanese Katakana (JISX0201.1976)"
74 "Katakana Part of JISX0201.1976"])
08c19a27 75(define-charset 138 'latin-jisx0201
cead26f6
KH
76 [1 94 1 0 ?J 0 "JISX0201 Roman" "Japanese Roman (JISX0201.1976)"
77 "Roman Part of JISX0201.1976"])
7153b1f1
KH
78
79;; CHARSET-ID is not used 139.
80
08c19a27 81(define-charset 140 'cyrillic-iso8859-5
cead26f6
KH
82 [1 96 1 0 ?L 1 "RHP of ISO8859/5" "RHP of Cyrillic (ISO 8859-5): ISO-IR-144"
83 "Right-Hand Part of Latin/Cyrillic Alphabet (ISO/IEC 8859-5): ISO-IR-144"])
08c19a27 84(define-charset 141 'latin-iso8859-9
cead26f6
KH
85 [1 96 1 0 ?M 1 "RHP of Latin-5" "RHP of Latin-5 (ISO 8859-9): ISO-IR-148"
86 "Right-Hand Part of Latin Alphabet 5 (ISO/IEC 8859-9): ISO-IR-148"])
7a860cf2 87(define-charset 142 'latin-iso8859-15
cead26f6
KH
88 [1 96 1 0 ?b 1 "RHP of Latin-9" "RHP of Latin-9 (ISO 8859-15): ISO-IR-203"
89 "Right-Hand Part of Latin Alphabet 9 (ISO/IEC 8859-15): ISO-IR-203"])
7a860cf2 90(define-charset 143 'latin-iso8859-14
cead26f6
KH
91 [1 96 1 0 ?_ 1 "RHP of Latin-8" "RHP of Latin-8 (ISO 8859-14)"
92 "Right-Hand Part of Latin Alphabet 8 (ISO/IEC 8859-14)"])
7153b1f1
KH
93
94;; 2-byte charsets. Valid range of CHARSET-ID is 144..153.
95
08c19a27 96(define-charset 144 'japanese-jisx0208-1978
cead26f6
KH
97 [2 94 2 0 ?@ 0 "JISX0208.1978" "JISX0208.1978 (Japanese): ISO-IR-42"
98 "JISX0208.1978 Japanese Kanji (so called \"old JIS\"): ISO-IR-42"])
08c19a27 99(define-charset 145 'chinese-gb2312
cead26f6
KH
100 [2 94 2 0 ?A 0 "GB2312" "GB2312: ISO-IR-58"
101 "GB2312 Chinese simplified: ISO-IR-58"])
08c19a27 102(define-charset 146 'japanese-jisx0208
cead26f6
KH
103 [2 94 2 0 ?B 0 "JISX0208" "JISX0208.1983/1990 (Japanese): ISO-IR-87"
104 "JISX0208.1983/1990 Japanese Kanji: ISO-IR-87"])
08c19a27 105(define-charset 147 'korean-ksc5601
cead26f6
KH
106 [2 94 2 0 ?C 0 "KSC5601" "KSC5601 (Korean): ISO-IR-149"
107 "KSC5601 Korean Hangul and Hanja: ISO-IR-149"])
08c19a27 108(define-charset 148 'japanese-jisx0212
cead26f6
KH
109 [2 94 2 0 ?D 0 "JISX0212" "JISX0212 (Japanese): ISO-IR-159"
110 "JISX0212 Japanese supplement: ISO-IR-159"])
08c19a27 111(define-charset 149 'chinese-cns11643-1
cead26f6
KH
112 [2 94 2 0 ?G 0 "CNS11643-1" "CNS11643-1 (Chinese traditional): ISO-IR-171"
113 "CNS11643 Plane 1 Chinese traditional: ISO-IR-171"])
08c19a27 114(define-charset 150 'chinese-cns11643-2
cead26f6
KH
115 [2 94 2 0 ?H 0 "CNS11643-2" "CNS11643-2 (Chinese traditional): ISO-IR-172"
116 "CNS11643 Plane 2 Chinese traditional: ISO-IR-172"])
7153b1f1
KH
117(define-charset 151 'japanese-jisx0213-1
118 [2 94 2 0 ?O 0 "JISX0213-1" "JISX0213-1" "JISX0213 Plane 1 (Japanese)"])
08c19a27 119(define-charset 152 'chinese-big5-1
cead26f6
KH
120 [2 94 2 0 ?0 0 "Big5 (Level-1)" "Big5 (Level-1) A141-C67F"
121 "Frequentry used part (A141-C67F) of Big5 (Chinese traditional)"])
08c19a27 122(define-charset 153 'chinese-big5-2
cead26f6
KH
123 [2 94 2 0 ?1 0 "Big5 (Level-2)" "Big5 (Level-2) C940-FEFE"
124 "Less frequentry used part (C940-FEFE) of Big5 (Chinese traditional)"])
08c19a27
KH
125
126;; Additional (private) character sets. These character sets are
7a860cf2 127;; treated less space-efficiently in the buffer.
08c19a27
KH
128
129;; Syntax:
7153b1f1 130;; (define-charset CHARSET-ID CHARSET
08c19a27
KH
131;; [ DIMENSION CHARS WIDTH DIRECTION ISO-FINAL-CHAR ISO-GRAPHIC-PLANE
132;; SHORT-NAME LONG-NAME DESCRIPTION ])
133
134;; ISO-2022 allows a use of character sets not registered in ISO with
135;; final characters `0' (0x30) through `?' (0x3F). Among them, Emacs
136;; reserves `0' through `9' to support several private character sets.
137;; The remaining final characters `:' through `?' are for users.
138
7153b1f1
KH
139;; 1-byte 1-column charsets. Valid range of CHARSET-ID is 160..223.
140
141(define-charset 160 'chinese-sisheng
08c19a27
KH
142 [1 94 1 0 ?0 0 "SiSheng" "SiSheng (PinYin/ZhuYin)"
143 "SiSheng characters for PinYin/ZhuYin"])
144
145;; IPA characters for phonetic symbols.
7153b1f1 146(define-charset 161 'ipa
08c19a27
KH
147 [1 96 1 0 ?0 1 "IPA" "IPA" "IPA (International Phonetic Association)"])
148
149;; Vietnamese VISCII. VISCII is 1-byte character set which contains
150;; more than 96 characters. Since Emacs can't handle it as one
151;; character set, it is divided into two: lower case letters and upper
152;; case letters.
7153b1f1 153(define-charset 162 'vietnamese-viscii-lower
2aa72de7 154 [1 96 1 0 ?1 1 "VISCII lower" "VISCII lower-case" "VISCII1.1 lower-case"])
7153b1f1 155(define-charset 163 'vietnamese-viscii-upper
2aa72de7 156 [1 96 1 0 ?2 1 "VISCII upper" "VISCII upper-case" "VISCII1.1 upper-case"])
08c19a27
KH
157
158;; For Arabic, we need three different types of character sets.
159;; Digits are of direction left-to-right and of width 1-column.
160;; Others are of direction right-to-left and of width 1-column or
161;; 2-column.
7153b1f1 162(define-charset 164 'arabic-digit
2aa72de7 163 [1 94 1 0 ?2 0 "Arabic digit" "Arabic digit" "Arabic digit"])
7153b1f1 164(define-charset 165 'arabic-1-column
2aa72de7 165 [1 94 1 1 ?3 0 "Arabic 1-col" "Arabic 1-column" "Arabic 1-column"])
7153b1f1
KH
166
167;; ASCII with right-to-left direction.
168(define-charset 166 'ascii-right-to-left
169 [1 94 1 1 ?B 0 "rev ASCII" "ASCII with right-to-left direction"
170 "ASCII (left half of ISO 8859-1) with right-to-left direction"])
171
172;; Lao script.
173;; ISO10646's 0x0E80..0x0EDF are mapped to 0x20..0x7F.
174(define-charset 167 'lao
175 [1 94 1 0 ?1 0 "Lao" "Lao" "Lao characters (ISO10646 0E80..0EDF)"])
176
8f47302e
AC
177;; Mac Roman. Mac Roman uses all upper 128 characters. Emacs can
178;; handle it by using two characters sets: mac-roman-lower for code
179;; points 128 to 159 and mac-roman-upper for code points 160 to 255.
180(define-charset 168 'mac-roman-lower
181 [1 96 1 0 ?3 1 "Mac Roman lower" "Mac Roman lower" "Mac Roman lower"])
182
183(define-charset 169 'mac-roman-upper
184 [1 96 1 0 ?4 1 "Mac Roman upper" "Mac Roman upper" "Mac Roman upper"])
185
186;; CHARSET-IDs 170..223 are not used.
7153b1f1
KH
187
188;; 1-byte 2-column charsets. Valid range of CHARSET-ID is 224..239.
189
190(define-charset 224 'arabic-2-column
2aa72de7 191 [1 94 2 1 ?4 0 "Arabic 2-col" "Arabic 2-column" "Arabic 2-column"])
08c19a27 192
7153b1f1
KH
193;; Indian scripts. Symbolic charset for data exchange. Glyphs are
194;; not assigned. They are automatically converted to each Indian
195;; script which IS-13194 supports.
196
197(define-charset 225 'indian-is13194
198 [1 94 2 0 ?5 1 "IS 13194" "Indian IS 13194"
199 "Generic Indian charset for data exchange with IS 13194"])
200
201;; CHARSET-IDs 226..239 are not used.
202
203;; 2-byte 1-column charsets. Valid range of CHARSET-ID is 240..244.
204
205;; Actual Glyph for 1-column width.
206(define-charset 240 'indian-1-column
207 [2 94 1 0 ?6 0 "Indian 1-col" "Indian 1 Column"
208 "Indian charset for 2-column width glyphs"])
209
210(define-charset 241 'tibetan-1-column
211 [2 94 1 0 ?8 0 "Tibetan 1-col" "Tibetan 1 column" "Tibetan 1 column glyph"])
212
213;; CHARSET-IDs 242 and 243 are not used.
214
215;; Subset of Unicode.
216(define-charset 244 'mule-unicode-0100-24ff
217 [2 96 1 0 ?1 0 "Unicode subset" "Unicode subset (U+0100..U+24FF)"
218 "Unicode characters of the range U+0100..U+24FF."])
219
220;; 2-byte 2-column charsets. Valid range of CHARSET-ID is 245..254.
221
08c19a27 222;; Ethiopic characters (Amahric and Tigrigna).
7153b1f1 223(define-charset 245 'ethiopic
d2382a1d 224 [2 94 2 0 ?3 0 "Ethiopic" "Ethiopic characters" "Ethiopic characters"])
08c19a27
KH
225
226;; Chinese CNS11643 Plane3 thru Plane7. Although these are official
227;; character sets, the use is rare and don't have to be treated
7a860cf2 228;; space-efficiently in the buffer.
7153b1f1 229(define-charset 246 'chinese-cns11643-3
cead26f6
KH
230 [2 94 2 0 ?I 0 "CNS11643-3" "CNS11643-3 (Chinese traditional): ISO-IR-183"
231 "CNS11643 Plane 3 Chinese Traditional: ISO-IR-183"])
7153b1f1 232(define-charset 247 'chinese-cns11643-4
cead26f6
KH
233 [2 94 2 0 ?J 0 "CNS11643-4" "CNS11643-4 (Chinese traditional): ISO-IR-184"
234 "CNS11643 Plane 4 Chinese Traditional: ISO-IR-184"])
7153b1f1 235(define-charset 248 'chinese-cns11643-5
cead26f6
KH
236 [2 94 2 0 ?K 0 "CNS11643-5" "CNS11643-5 (Chinese traditional): ISO-IR-185"
237 "CNS11643 Plane 5 Chinese Traditional: ISO-IR-185"])
7153b1f1 238(define-charset 249 'chinese-cns11643-6
cead26f6
KH
239 [2 94 2 0 ?L 0 "CNS11643-6" "CNS11643-6 (Chinese traditional): ISO-IR-186"
240 "CNS11643 Plane 6 Chinese Traditional: ISO-IR-186"])
7153b1f1 241(define-charset 250 'chinese-cns11643-7
cead26f6
KH
242 [2 94 2 0 ?M 0 "CNS11643-7" "CNS11643-7 (Chinese traditional): ISO-IR-187"
243 "CNS11643 Plane 7 Chinese Traditional: ISO-IR-187"])
08c19a27 244
08c19a27 245;; Actual Glyph for 2-column width.
7153b1f1 246(define-charset 251 'indian-2-column
2aa72de7 247 [2 94 2 0 ?5 0 "Indian 2-col" "Indian 2 Column"
08c19a27 248 "Indian charset for 2-column width glyphs"])
08c19a27 249
2aa72de7 250;; Tibetan script.
7153b1f1 251(define-charset 252 'tibetan
2aa72de7 252 [2 94 2 0 ?7 0 "Tibetan 2-col" "Tibetan 2 column" "Tibetan characters"])
7153b1f1
KH
253
254;; CHARSET-ID 253 is not used.
255
256;; JISX0213 Plane 2
257(define-charset 254 'japanese-jisx0213-2
258 [2 94 2 0 ?P 0 "JISX0213-2" "JISX0213-2" "JISX0213 Plane 2 (Japanese)"])
2aa72de7 259
85f789f7
KH
260;; Tell C code charset ID's of several charsets.
261(setup-special-charsets)
08c19a27 262
85f789f7 263\f
d2a1ee18
KH
264;; These are tables for translating characters on decoding and
265;; encoding.
f967223b 266(define-translation-table
40e98681
KH
267 'oldjis-newjis-jisroman-ascii
268 (list (cons (make-char 'japanese-jisx0208-1978)
269 (make-char 'japanese-jisx0208))
270 (cons (make-char 'latin-jisx0201) (make-char 'ascii))))
3cd01a6c
KH
271(aset (get 'oldjis-newjis-jisroman-ascii 'translation-table)
272 (make-char 'latin-jisx0201 92) (make-char 'latin-jisx0201 92))
273(aset (get 'oldjis-newjis-jisroman-ascii 'translation-table)
274 (make-char 'latin-jisx0201 126) (make-char 'latin-jisx0201 126))
40e98681 275
f967223b
KH
276(setq standard-translation-table-for-decode
277 (get 'oldjis-newjis-jisroman-ascii 'translation-table))
08c19a27 278
f967223b 279(setq standard-translation-table-for-encode nil)
08c19a27
KH
280
281\f
282;;; Make fundamental coding systems.
283
284;; Miscellaneous coding systems which can't be made by
285;; `make-coding-system'.
286
287(put 'no-conversion 'coding-system
3fcbab9a
KH
288 (vector nil ?= "Do no conversion"
289 (list 'coding-category 'coding-category-binary
290 'alias-coding-systems '(no-conversion))
291 nil))
08c19a27 292(put 'no-conversion 'eol-type 0)
3fcbab9a
KH
293(put 'coding-category-binary 'coding-systems '(no-conversion))
294(setq coding-system-list '(no-conversion))
295(setq coding-system-alist '(("no-conversion")))
08c19a27 296
8da035d0
RS
297(define-coding-system-alias 'binary 'no-conversion)
298
426591c3 299(put 'undecided 'coding-system
76810f60 300 (vector t ?- "No conversion on encoding, automatic conversion on decoding"
08dcf825
KH
301 (list 'alias-coding-systems '(undecided)
302 'safe-charsets '(ascii))
3fcbab9a
KH
303 nil))
304(setq coding-system-list (cons 'undecided coding-system-list))
305(setq coding-system-alist (cons '("undecided") coding-system-alist))
426591c3 306(put 'undecided 'eol-type
3fcbab9a 307 (make-subsidiary-coding-system 'undecided))
08c19a27 308
8d969bf6 309(define-coding-system-alias 'unix 'undecided-unix)
1c445211
RS
310(define-coding-system-alias 'dos 'undecided-dos)
311(define-coding-system-alias 'mac 'undecided-mac)
312
08c19a27
KH
313;; Coding systems not specific to each language environment.
314
315(make-coding-system
426591c3 316 'emacs-mule 0 ?=
fec0e02d 317 "Emacs internal format used in buffer and string"
40e98681
KH
318 nil
319 '((safe-charsets . t)))
08c19a27 320
2cb30410
KH
321(make-coding-system
322 'raw-text 5 ?t
fec0e02d 323 "Raw text, which means text contains random 8-bit codes."
40e98681
KH
324 nil
325 '((safe-charsets . t)))
2cb30410 326
08c19a27 327(make-coding-system
4951a271
KH
328 'iso-2022-7bit 2 ?J
329 "ISO 2022 based 7-bit encoding using only G0"
08c19a27 330 '((ascii t) nil nil nil
fec0e02d 331 short ascii-eol ascii-cntl seven)
ccac3d77
KH
332 '((safe-charsets . t)
333 (composition . t)))
08c19a27
KH
334
335(make-coding-system
2792ce16 336 'iso-2022-7bit-ss2 2 ?$
4951a271
KH
337 "ISO 2022 based 7-bit encoding using SS2 for 96-charset"
338 '((ascii t) nil t nil
fec0e02d 339 short ascii-eol ascii-cntl seven nil single-shift)
ccac3d77
KH
340 '((safe-charsets . t)
341 (composition . t)))
4951a271
KH
342
343(make-coding-system
2792ce16 344 'iso-2022-7bit-lock 2 ?&
4951a271
KH
345 "ISO-2022 coding system using Locking-Shift for 96-charset"
346 '((ascii t) t nil nil
fec0e02d 347 nil ascii-eol ascii-cntl seven locking-shift)
ccac3d77
KH
348 '((safe-charsets . t)
349 (composition . t)))
4951a271 350
2e21aa27 351(define-coding-system-alias 'iso-2022-int-1 'iso-2022-7bit-lock)
08c19a27
KH
352
353(make-coding-system
4951a271 354 'iso-2022-7bit-lock-ss2 2 ?i
d0c5d809 355 "Mixture of ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN"
08c19a27
KH
356 '((ascii t)
357 (nil korean-ksc5601 chinese-gb2312 chinese-cns11643-1 t)
358 (nil chinese-cns11643-2)
359 (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
360 chinese-cns11643-6 chinese-cns11643-7)
d0c5d809 361 short ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil
fec0e02d 362 init-bol)
3374b353 363 '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978 latin-jisx0201
40e98681
KH
364 korean-ksc5601 chinese-gb2312 chinese-cns11643-1
365 chinese-cns11643-2 chinese-cns11643-3 chinese-cns11643-4
ccac3d77
KH
366 chinese-cns11643-5 chinese-cns11643-6 chinese-cns11643-7)
367 (composition . t)))
08c19a27 368
2e21aa27 369(define-coding-system-alias 'iso-2022-cjk 'iso-2022-7bit-lock-ss2)
08c19a27
KH
370
371(make-coding-system
4951a271
KH
372 'iso-2022-8bit-ss2 2 ?@
373 "ISO 2022 based 8-bit encoding using SS2 for 96-charset"
08c19a27 374 '((ascii t) nil t nil
fec0e02d 375 nil ascii-eol ascii-cntl nil nil single-shift)
ccac3d77
KH
376 '((safe-charsets . t)
377 (composition . t)))
08c19a27 378
d49a4835
KH
379(make-coding-system
380 'x-ctext 2 ?x
381 "Compound text based generic encoding for decoding unknown messages."
5259f34b 382 '((ascii t) (latin-iso8859-1 katakana-jisx0201 t) t t
d49a4835
KH
383 nil ascii-eol ascii-cntl nil locking-shift single-shift nil nil nil
384 init-bol nil nil)
385 '((safe-charsets . t)
ccac3d77
KH
386 (mime-charset . x-ctext)
387 (composition . t)))
d49a4835 388
f6eb8ace
KH
389(make-coding-system
390 'iso-safe 2 ?-
391 "Convert all characters but ASCII to `?'."
392 '(ascii nil nil nil
fec0e02d 393 nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil t)
40e98681 394 '((safe-charsets ascii)))
f6eb8ace 395
5b984695 396;; Use iso-safe for terminal output if some other coding system is not
e8dd0160 397;; specified explicitly.
f6eb8ace
KH
398(set-safe-terminal-coding-system-internal 'iso-safe)
399
08c19a27
KH
400;; The other coding-systems are defined in each language specific
401;; section of languages.el.
402
678dc7ec
RS
403;; Normally, set coding system to `undecided' before reading a file.
404;; Compiled Emacs Lisp files (*.elc) are not decoded at all,
405;; but we regard them as containing multibyte characters.
406;; Tar files are not decoded at all, but we treat them as raw bytes.
08c19a27 407
4951a271 408(setq file-coding-system-alist
2238f751
DL
409 '(("\\.elc\\'" . (emacs-mule . emacs-mule))
410 ("\\(\\`\\|/\\)loaddefs.el\\'" . (no-conversion . no-conversion))
411 ("\\.tar\\'" . (no-conversion . no-conversion))
4951a271 412 ("" . (undecided . nil))))
08c19a27
KH
413
414\f
415;;; Setting coding categories and their priorities.
416
417;; This setting is just to read an Emacs Lisp source files which
418;; contain multilingual text while dumping Emacs. More appropriate
2792ce16 419;; values are set by the command `set-language-environment' for each
08c19a27
KH
420;; language environment.
421
29742cb5
KH
422(setq coding-category-emacs-mule 'emacs-mule
423 coding-category-sjis 'japanese-shift-jis
424 coding-category-iso-7 'iso-2022-7bit
40e98681 425 coding-category-iso-7-tight 'iso-2022-jp
29742cb5 426 coding-category-iso-8-1 'iso-latin-1
5b984695 427 coding-category-iso-8-2 'iso-latin-1
29742cb5
KH
428 coding-category-iso-7-else 'iso-2022-7bit-lock
429 coding-category-iso-8-else 'iso-2022-8bit-ss2
a1223d6c 430 coding-category-ccl nil
2c7794b0
KH
431 coding-category-utf-8 nil
432 coding-category-utf-16-be nil
433 coding-category-utf-16-le nil
29742cb5 434 coding-category-big5 'chinese-big5
2cb30410 435 coding-category-raw-text 'raw-text
29742cb5 436 coding-category-binary 'no-conversion)
08c19a27
KH
437
438(set-coding-priority
5b984695 439 '(coding-category-iso-8-1
69b73c8a 440 coding-category-iso-8-2
5b984695
KH
441 coding-category-iso-7-tight
442 coding-category-iso-7
29742cb5 443 coding-category-iso-7-else
2cb30410 444 coding-category-iso-8-else
e4e6cfa0 445 coding-category-emacs-mule
2cb30410 446 coding-category-raw-text
08c19a27
KH
447 coding-category-sjis
448 coding-category-big5
a1223d6c 449 coding-category-ccl
2c7794b0
KH
450 coding-category-binary
451 coding-category-utf-16-be
452 coding-category-utf-16-le
453 coding-category-utf-8))
08c19a27 454
c1b628eb
KH
455\f
456;;; Miscellaneous settings.
457(aset latin-extra-code-table ?\222 t)
458
4cb4b388
KH
459(update-coding-systems-internal)
460
08c19a27 461;;; mule-conf.el ends here