*** empty log message ***
[bpt/emacs.git] / lisp / international / mule-conf.el
CommitLineData
0a10297a 1;;; mule-conf.el --- configure multilingual environment -*- no-byte-compile: t -*-
08c19a27 2
08c19a27 3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
fa526c4a 4;; Licensed to the Free Software Foundation.
c791cb54 5;; Copyright (C) 2005 Free Software Foundation, Inc.
08c19a27
KH
6
7;; Keywords: mule, multilingual, character set, coding system
8
9;; This file is part of GNU Emacs.
10
11;; GNU Emacs is free software; you can redistribute it and/or modify
12;; it under the terms of the GNU General Public License as published by
13;; the Free Software Foundation; either version 2, or (at your option)
14;; any later version.
15
16;; GNU Emacs is distributed in the hope that it will be useful,
17;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;; GNU General Public License for more details.
20
21;; You should have received a copy of the GNU General Public License
22;; along with GNU Emacs; see the file COPYING. If not, write to the
23;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24;; Boston, MA 02111-1307, USA.
25
26;;; Commentary:
27
28;; Don't byte-compile this file.
29
30;;; Code:
31
32;;; Definitions of character sets.
33
34;; Basic (official) character sets. These character sets are treated
7a860cf2 35;; efficiently with respect to buffer memory.
08c19a27
KH
36
37;; Syntax:
38;; (define-charset CHARSET-ID CHARSET
39;; [ DIMENSION CHARS WIDTH DIRECTION ISO-FINAL-CHAR ISO-GRAPHIC-PLANE
40;; SHORT-NAME LONG-NAME DESCRIPTION ])
41;; ASCII charset is defined in src/charset.c as below.
42;; (define-charset 0 ascii
43;; [1 94 1 0 ?B 0 "ASCII" "ASCII" "ASCII (ISO646 IRV)"])
44
7153b1f1
KH
45;; 1-byte charsets. Valid range of CHARSET-ID is 128..143.
46
47;; CHARSET-ID 128 is not used.
48
08c19a27 49(define-charset 129 'latin-iso8859-1
cead26f6 50 [1 96 1 0 ?A 1 "RHP of Latin-1" "RHP of Latin-1 (ISO 8859-1): ISO-IR-100"
5a6b038a 51 "Right-Hand Part of Latin Alphabet 1 (ISO/IEC 8859-1): ISO-IR-100."])
08c19a27 52(define-charset 130 'latin-iso8859-2
cead26f6 53 [1 96 1 0 ?B 1 "RHP of Latin-2" "RHP of Latin-2 (ISO 8859-2): ISO-IR-101"
5a6b038a 54 "Right-Hand Part of Latin Alphabet 2 (ISO/IEC 8859-2): ISO-IR-101."])
08c19a27 55(define-charset 131 'latin-iso8859-3
cead26f6 56 [1 96 1 0 ?C 1 "RHP of Latin-3" "RHP of Latin-3 (ISO 8859-3): ISO-IR-109"
5a6b038a 57 "Right-Hand Part of Latin Alphabet 3 (ISO/IEC 8859-3): ISO-IR-109."])
08c19a27 58(define-charset 132 'latin-iso8859-4
cead26f6 59 [1 96 1 0 ?D 1 "RHP of Latin-4" "RHP of Latin-4 (ISO 8859-4): ISO-IR-110"
5a6b038a 60 "Right-Hand Part of Latin Alphabet 4 (ISO/IEC 8859-4): ISO-IR-110."])
08c19a27 61(define-charset 133 'thai-tis620
cead26f6 62 [1 96 1 0 ?T 1 "RHP of TIS620" "RHP of Thai (TIS620): ISO-IR-166"
5a6b038a 63 "Right-Hand Part of TIS620.2533 (Thai): ISO-IR-166."])
08c19a27 64(define-charset 134 'greek-iso8859-7
cead26f6 65 [1 96 1 0 ?F 1 "RHP of ISO8859/7" "RHP of Greek (ISO 8859-7): ISO-IR-126"
5a6b038a 66 "Right-Hand Part of Latin/Greek Alphabet (ISO/IEC 8859-7): ISO-IR-126."])
08c19a27 67(define-charset 135 'arabic-iso8859-6
cead26f6 68 [1 96 1 1 ?G 1 "RHP of ISO8859/6" "RHP of Arabic (ISO 8859-6): ISO-IR-127"
5a6b038a 69 "Right-Hand Part of Latin/Arabic Alphabet (ISO/IEC 8859-6): ISO-IR-127."])
08c19a27 70(define-charset 136 'hebrew-iso8859-8
cead26f6 71 [1 96 1 1 ?H 1 "RHP of ISO8859/8" "RHP of Hebrew (ISO 8859-8): ISO-IR-138"
5a6b038a 72 "Right-Hand Part of Latin/Hebrew Alphabet (ISO/IEC 8859-8): ISO-IR-138."])
08c19a27 73(define-charset 137 'katakana-jisx0201
cead26f6 74 [1 94 1 0 ?I 1 "JISX0201 Katakana" "Japanese Katakana (JISX0201.1976)"
5a6b038a 75 "Katakana Part of JISX0201.1976."])
08c19a27 76(define-charset 138 'latin-jisx0201
cead26f6 77 [1 94 1 0 ?J 0 "JISX0201 Roman" "Japanese Roman (JISX0201.1976)"
5a6b038a 78 "Roman Part of JISX0201.1976."])
7153b1f1
KH
79
80;; CHARSET-ID is not used 139.
81
08c19a27 82(define-charset 140 'cyrillic-iso8859-5
cead26f6 83 [1 96 1 0 ?L 1 "RHP of ISO8859/5" "RHP of Cyrillic (ISO 8859-5): ISO-IR-144"
5a6b038a 84 "Right-Hand Part of Latin/Cyrillic Alphabet (ISO/IEC 8859-5): ISO-IR-144."])
08c19a27 85(define-charset 141 'latin-iso8859-9
cead26f6 86 [1 96 1 0 ?M 1 "RHP of Latin-5" "RHP of Latin-5 (ISO 8859-9): ISO-IR-148"
5a6b038a 87 "Right-Hand Part of Latin Alphabet 5 (ISO/IEC 8859-9): ISO-IR-148."])
7a860cf2 88(define-charset 142 'latin-iso8859-15
cead26f6 89 [1 96 1 0 ?b 1 "RHP of Latin-9" "RHP of Latin-9 (ISO 8859-15): ISO-IR-203"
5a6b038a 90 "Right-Hand Part of Latin Alphabet 9 (ISO/IEC 8859-15): ISO-IR-203."])
7a860cf2 91(define-charset 143 'latin-iso8859-14
bdf74bef 92 [1 96 1 0 ?_ 1 "RHP of Latin-8" "RHP of Latin-8 (ISO 8859-14): ISO-IR-199"
5a6b038a 93 "Right-Hand Part of Latin Alphabet 8 (ISO/IEC 8859-14): ISO-IR-199."])
7153b1f1
KH
94
95;; 2-byte charsets. Valid range of CHARSET-ID is 144..153.
96
08c19a27 97(define-charset 144 'japanese-jisx0208-1978
cead26f6 98 [2 94 2 0 ?@ 0 "JISX0208.1978" "JISX0208.1978 (Japanese): ISO-IR-42"
5a6b038a 99 "JISX0208.1978 Japanese Kanji (so called \"old JIS\"): ISO-IR-42."])
08c19a27 100(define-charset 145 'chinese-gb2312
cead26f6 101 [2 94 2 0 ?A 0 "GB2312" "GB2312: ISO-IR-58"
5a6b038a 102 "GB2312 Chinese simplified: ISO-IR-58."])
08c19a27 103(define-charset 146 'japanese-jisx0208
cead26f6 104 [2 94 2 0 ?B 0 "JISX0208" "JISX0208.1983/1990 (Japanese): ISO-IR-87"
5a6b038a 105 "JISX0208.1983/1990 Japanese Kanji: ISO-IR-87."])
08c19a27 106(define-charset 147 'korean-ksc5601
cead26f6 107 [2 94 2 0 ?C 0 "KSC5601" "KSC5601 (Korean): ISO-IR-149"
5a6b038a 108 "KSC5601 Korean Hangul and Hanja: ISO-IR-149."])
08c19a27 109(define-charset 148 'japanese-jisx0212
cead26f6 110 [2 94 2 0 ?D 0 "JISX0212" "JISX0212 (Japanese): ISO-IR-159"
5a6b038a 111 "JISX0212 Japanese supplement: ISO-IR-159."])
08c19a27 112(define-charset 149 'chinese-cns11643-1
cead26f6 113 [2 94 2 0 ?G 0 "CNS11643-1" "CNS11643-1 (Chinese traditional): ISO-IR-171"
5a6b038a 114 "CNS11643 Plane 1 Chinese traditional: ISO-IR-171."])
08c19a27 115(define-charset 150 'chinese-cns11643-2
cead26f6 116 [2 94 2 0 ?H 0 "CNS11643-2" "CNS11643-2 (Chinese traditional): ISO-IR-172"
5a6b038a 117 "CNS11643 Plane 2 Chinese traditional: ISO-IR-172."])
7153b1f1
KH
118(define-charset 151 'japanese-jisx0213-1
119 [2 94 2 0 ?O 0 "JISX0213-1" "JISX0213-1" "JISX0213 Plane 1 (Japanese)"])
08c19a27 120(define-charset 152 'chinese-big5-1
cead26f6 121 [2 94 2 0 ?0 0 "Big5 (Level-1)" "Big5 (Level-1) A141-C67F"
5a6b038a 122 "Frequently used part (A141-C67F) of Big5 (Chinese traditional)."])
08c19a27 123(define-charset 153 'chinese-big5-2
cead26f6 124 [2 94 2 0 ?1 0 "Big5 (Level-2)" "Big5 (Level-2) C940-FEFE"
5a6b038a 125 "Less frequently used part (C940-FEFE) of Big5 (Chinese traditional)."])
08c19a27
KH
126
127;; Additional (private) character sets. These character sets are
7a860cf2 128;; treated less space-efficiently in the buffer.
08c19a27
KH
129
130;; Syntax:
7153b1f1 131;; (define-charset CHARSET-ID CHARSET
08c19a27
KH
132;; [ DIMENSION CHARS WIDTH DIRECTION ISO-FINAL-CHAR ISO-GRAPHIC-PLANE
133;; SHORT-NAME LONG-NAME DESCRIPTION ])
134
135;; ISO-2022 allows a use of character sets not registered in ISO with
136;; final characters `0' (0x30) through `?' (0x3F). Among them, Emacs
137;; reserves `0' through `9' to support several private character sets.
138;; The remaining final characters `:' through `?' are for users.
139
7153b1f1
KH
140;; 1-byte 1-column charsets. Valid range of CHARSET-ID is 160..223.
141
142(define-charset 160 'chinese-sisheng
08c19a27 143 [1 94 1 0 ?0 0 "SiSheng" "SiSheng (PinYin/ZhuYin)"
5a6b038a 144 "Sisheng characters (vowels with tone marks) for Pinyin/Zhuyin."])
08c19a27
KH
145
146;; IPA characters for phonetic symbols.
7153b1f1 147(define-charset 161 'ipa
5a6b038a
WL
148 [1 96 1 0 ?0 1 "IPA" "IPA"
149 "IPA (International Phonetic Association) characters."])
08c19a27
KH
150
151;; Vietnamese VISCII. VISCII is 1-byte character set which contains
152;; more than 96 characters. Since Emacs can't handle it as one
153;; character set, it is divided into two: lower case letters and upper
154;; case letters.
7153b1f1 155(define-charset 162 'vietnamese-viscii-lower
5a6b038a
WL
156 [1 96 1 0 ?1 1 "VISCII lower" "VISCII lower-case"
157 "Vietnamese VISCII1.1 lower-case characters."])
7153b1f1 158(define-charset 163 'vietnamese-viscii-upper
5a6b038a
WL
159 [1 96 1 0 ?2 1 "VISCII upper" "VISCII upper-case"
160 "Vietnamese VISCII1.1 upper-case characters."])
08c19a27
KH
161
162;; For Arabic, we need three different types of character sets.
163;; Digits are of direction left-to-right and of width 1-column.
164;; Others are of direction right-to-left and of width 1-column or
165;; 2-column.
7153b1f1 166(define-charset 164 'arabic-digit
5a6b038a
WL
167 [1 94 1 0 ?2 0 "Arabic digit" "Arabic digit"
168 "Arabic digits."])
7153b1f1 169(define-charset 165 'arabic-1-column
5a6b038a
WL
170 [1 94 1 1 ?3 0 "Arabic 1-col" "Arabic 1-column"
171 "Arabic 1-column width glyphs."])
7153b1f1
KH
172
173;; ASCII with right-to-left direction.
174(define-charset 166 'ascii-right-to-left
175 [1 94 1 1 ?B 0 "rev ASCII" "ASCII with right-to-left direction"
5a6b038a 176 "ASCII (left half of ISO 8859-1) with right-to-left direction."])
7153b1f1
KH
177
178;; Lao script.
179;; ISO10646's 0x0E80..0x0EDF are mapped to 0x20..0x7F.
180(define-charset 167 'lao
5a6b038a
WL
181 [1 94 1 0 ?1 0 "Lao" "Lao"
182 "Lao characters (U+0E80..U+0EDF)."])
7153b1f1 183
e7f614fc 184;; CHARSET-IDs 168..223 are not used.
7153b1f1
KH
185
186;; 1-byte 2-column charsets. Valid range of CHARSET-ID is 224..239.
187
188(define-charset 224 'arabic-2-column
5a6b038a
WL
189 [1 94 2 1 ?4 0 "Arabic 2-col" "Arabic 2-column"
190 "Arabic 2-column glyphs."])
08c19a27 191
7153b1f1
KH
192;; Indian scripts. Symbolic charset for data exchange. Glyphs are
193;; not assigned. They are automatically converted to each Indian
194;; script which IS-13194 supports.
195
196(define-charset 225 'indian-is13194
197 [1 94 2 0 ?5 1 "IS 13194" "Indian IS 13194"
5a6b038a 198 "Generic Indian character set for data exchange with IS 13194."])
7153b1f1
KH
199
200;; CHARSET-IDs 226..239 are not used.
201
16808556
RS
202(define-charset 240 'indian-glyph
203 [2 96 1 0 ?4 0 "Indian glyph" "Indian glyph"
204 "Glyphs for Indian characters."])
205;; 240 used to be [2 94 1 0 ?6 0 "Indian 1-col" "Indian 1 Column"]
206
7153b1f1
KH
207;; 2-byte 1-column charsets. Valid range of CHARSET-ID is 240..244.
208
209;; Actual Glyph for 1-column width.
7153b1f1 210(define-charset 241 'tibetan-1-column
5a6b038a
WL
211 [2 94 1 0 ?8 0 "Tibetan 1-col" "Tibetan 1 column"
212 "Tibetan 1-column glyphs."])
7153b1f1 213
e98a6f1c
KH
214;; Subsets of Unicode.
215
216(define-charset 242 'mule-unicode-2500-33ff
217 [2 96 1 0 ?2 0 "Unicode subset 2" "Unicode subset (U+2500..U+33FF)"
218 "Unicode characters of the range U+2500..U+33FF."])
219
220(define-charset 243 'mule-unicode-e000-ffff
221 [2 96 1 0 ?3 0 "Unicode subset 3" "Unicode subset (U+E000+FFFF)"
222 "Unicode characters of the range U+E000..U+FFFF."])
7153b1f1 223
7153b1f1
KH
224(define-charset 244 'mule-unicode-0100-24ff
225 [2 96 1 0 ?1 0 "Unicode subset" "Unicode subset (U+0100..U+24FF)"
226 "Unicode characters of the range U+0100..U+24FF."])
227
228;; 2-byte 2-column charsets. Valid range of CHARSET-ID is 245..254.
229
7a362b93 230;; Ethiopic characters (Amharic and Tigrigna).
7153b1f1 231(define-charset 245 'ethiopic
5a6b038a
WL
232 [2 94 2 0 ?3 0 "Ethiopic" "Ethiopic characters"
233 "Ethiopic characters."])
08c19a27
KH
234
235;; Chinese CNS11643 Plane3 thru Plane7. Although these are official
236;; character sets, the use is rare and don't have to be treated
7a860cf2 237;; space-efficiently in the buffer.
7153b1f1 238(define-charset 246 'chinese-cns11643-3
cead26f6 239 [2 94 2 0 ?I 0 "CNS11643-3" "CNS11643-3 (Chinese traditional): ISO-IR-183"
5a6b038a 240 "CNS11643 Plane 3 Chinese Traditional: ISO-IR-183."])
7153b1f1 241(define-charset 247 'chinese-cns11643-4
cead26f6 242 [2 94 2 0 ?J 0 "CNS11643-4" "CNS11643-4 (Chinese traditional): ISO-IR-184"
5a6b038a 243 "CNS11643 Plane 4 Chinese Traditional: ISO-IR-184."])
7153b1f1 244(define-charset 248 'chinese-cns11643-5
cead26f6 245 [2 94 2 0 ?K 0 "CNS11643-5" "CNS11643-5 (Chinese traditional): ISO-IR-185"
5a6b038a 246 "CNS11643 Plane 5 Chinese Traditional: ISO-IR-185."])
7153b1f1 247(define-charset 249 'chinese-cns11643-6
cead26f6 248 [2 94 2 0 ?L 0 "CNS11643-6" "CNS11643-6 (Chinese traditional): ISO-IR-186"
5a6b038a 249 "CNS11643 Plane 6 Chinese Traditional: ISO-IR-186."])
7153b1f1 250(define-charset 250 'chinese-cns11643-7
cead26f6 251 [2 94 2 0 ?M 0 "CNS11643-7" "CNS11643-7 (Chinese traditional): ISO-IR-187"
5a6b038a 252 "CNS11643 Plane 7 Chinese Traditional: ISO-IR-187."])
08c19a27 253
08c19a27 254;; Actual Glyph for 2-column width.
7153b1f1 255(define-charset 251 'indian-2-column
2aa72de7 256 [2 94 2 0 ?5 0 "Indian 2-col" "Indian 2 Column"
5a6b038a 257 "Indian character set for 2-column width glyphs."])
16808556
RS
258 ;; old indian-1-column characters will be translated to indian-2-column.
259(declare-equiv-charset 2 94 ?6 'indian-2-column)
08c19a27 260
2aa72de7 261;; Tibetan script.
7153b1f1 262(define-charset 252 'tibetan
5a6b038a
WL
263 [2 94 2 0 ?7 0 "Tibetan 2-col" "Tibetan 2 column"
264 "Tibetan 2-column width glyphs."])
7153b1f1
KH
265
266;; CHARSET-ID 253 is not used.
267
268;; JISX0213 Plane 2
269(define-charset 254 'japanese-jisx0213-2
5a6b038a
WL
270 [2 94 2 0 ?P 0 "JISX0213-2" "JISX0213-2"
271 "JISX0213 Plane 2 (Japanese)."])
2aa72de7 272
85f789f7
KH
273;; Tell C code charset ID's of several charsets.
274(setup-special-charsets)
08c19a27 275
85f789f7 276\f
d2a1ee18
KH
277;; These are tables for translating characters on decoding and
278;; encoding.
f967223b 279(define-translation-table
40e98681
KH
280 'oldjis-newjis-jisroman-ascii
281 (list (cons (make-char 'japanese-jisx0208-1978)
282 (make-char 'japanese-jisx0208))
283 (cons (make-char 'latin-jisx0201) (make-char 'ascii))))
3cd01a6c
KH
284(aset (get 'oldjis-newjis-jisroman-ascii 'translation-table)
285 (make-char 'latin-jisx0201 92) (make-char 'latin-jisx0201 92))
286(aset (get 'oldjis-newjis-jisroman-ascii 'translation-table)
287 (make-char 'latin-jisx0201 126) (make-char 'latin-jisx0201 126))
40e98681 288
f967223b
KH
289(setq standard-translation-table-for-decode
290 (get 'oldjis-newjis-jisroman-ascii 'translation-table))
08c19a27 291
f967223b 292(setq standard-translation-table-for-encode nil)
08c19a27
KH
293\f
294;;; Make fundamental coding systems.
295
296;; Miscellaneous coding systems which can't be made by
297;; `make-coding-system'.
298
299(put 'no-conversion 'coding-system
bc6a0946
KH
300 (vector nil ?= "Do no conversion.
301
302When you visit a file with this coding, the file is read into a
303unibyte buffer as is, thus each byte of a file is treated as a
304character."
3fcbab9a 305 (list 'coding-category 'coding-category-binary
701117d5
KH
306 'alias-coding-systems '(no-conversion)
307 'safe-charsets t 'safe-chars t)
3fcbab9a 308 nil))
08c19a27 309(put 'no-conversion 'eol-type 0)
3fcbab9a
KH
310(put 'coding-category-binary 'coding-systems '(no-conversion))
311(setq coding-system-list '(no-conversion))
312(setq coding-system-alist '(("no-conversion")))
701117d5 313(define-coding-system-internal 'no-conversion)
08c19a27 314
8da035d0
RS
315(define-coding-system-alias 'binary 'no-conversion)
316
426591c3 317(put 'undecided 'coding-system
76810f60 318 (vector t ?- "No conversion on encoding, automatic conversion on decoding"
08dcf825
KH
319 (list 'alias-coding-systems '(undecided)
320 'safe-charsets '(ascii))
3fcbab9a
KH
321 nil))
322(setq coding-system-list (cons 'undecided coding-system-list))
323(setq coding-system-alist (cons '("undecided") coding-system-alist))
426591c3 324(put 'undecided 'eol-type
3fcbab9a 325 (make-subsidiary-coding-system 'undecided))
08c19a27 326
8d969bf6 327(define-coding-system-alias 'unix 'undecided-unix)
1c445211
RS
328(define-coding-system-alias 'dos 'undecided-dos)
329(define-coding-system-alias 'mac 'undecided-mac)
330
08c19a27
KH
331;; Coding systems not specific to each language environment.
332
333(make-coding-system
426591c3 334 'emacs-mule 0 ?=
695ac440 335 "Emacs internal format used in buffer and string.
bc6a0946 336
695ac440
KH
337Encoding text with this coding system produces the actual byte
338sequence of the text in buffers and strings. An exception is made for
339eight-bit-control characters. Each of them is encoded into a single
340byte."
40e98681 341 nil
06859d9e
KH
342 '((safe-charsets . t)
343 (composition . t)))
08c19a27 344
2cb30410
KH
345(make-coding-system
346 'raw-text 5 ?t
695ac440
KH
347 "Raw text, which means text contains random 8-bit codes.
348Encoding text with this coding system produces the actual byte
349sequence of the text in buffers and strings. An exception is made for
350eight-bit-control characters. Each of them is encoded into a single
bc6a0946
KH
351byte.
352
353When you visit a file with this coding, the file is read into a
354unibyte buffer as is (except for EOL format), thus each byte of a file
355is treated as a character."
40e98681
KH
356 nil
357 '((safe-charsets . t)))
2cb30410 358
08c19a27 359(make-coding-system
4951a271
KH
360 'iso-2022-7bit 2 ?J
361 "ISO 2022 based 7-bit encoding using only G0"
08c19a27 362 '((ascii t) nil nil nil
fec0e02d 363 short ascii-eol ascii-cntl seven)
ccac3d77
KH
364 '((safe-charsets . t)
365 (composition . t)))
08c19a27
KH
366
367(make-coding-system
2792ce16 368 'iso-2022-7bit-ss2 2 ?$
4951a271
KH
369 "ISO 2022 based 7-bit encoding using SS2 for 96-charset"
370 '((ascii t) nil t nil
fec0e02d 371 short ascii-eol ascii-cntl seven nil single-shift)
ccac3d77
KH
372 '((safe-charsets . t)
373 (composition . t)))
4951a271
KH
374
375(make-coding-system
2792ce16 376 'iso-2022-7bit-lock 2 ?&
4951a271
KH
377 "ISO-2022 coding system using Locking-Shift for 96-charset"
378 '((ascii t) t nil nil
fec0e02d 379 nil ascii-eol ascii-cntl seven locking-shift)
ccac3d77
KH
380 '((safe-charsets . t)
381 (composition . t)))
4951a271 382
2e21aa27 383(define-coding-system-alias 'iso-2022-int-1 'iso-2022-7bit-lock)
08c19a27
KH
384
385(make-coding-system
4951a271 386 'iso-2022-7bit-lock-ss2 2 ?i
d0c5d809 387 "Mixture of ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN"
08c19a27
KH
388 '((ascii t)
389 (nil korean-ksc5601 chinese-gb2312 chinese-cns11643-1 t)
390 (nil chinese-cns11643-2)
391 (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
392 chinese-cns11643-6 chinese-cns11643-7)
d0c5d809 393 short ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil
fec0e02d 394 init-bol)
3374b353 395 '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978 latin-jisx0201
40e98681
KH
396 korean-ksc5601 chinese-gb2312 chinese-cns11643-1
397 chinese-cns11643-2 chinese-cns11643-3 chinese-cns11643-4
ccac3d77
KH
398 chinese-cns11643-5 chinese-cns11643-6 chinese-cns11643-7)
399 (composition . t)))
08c19a27 400
2e21aa27 401(define-coding-system-alias 'iso-2022-cjk 'iso-2022-7bit-lock-ss2)
08c19a27
KH
402
403(make-coding-system
4951a271
KH
404 'iso-2022-8bit-ss2 2 ?@
405 "ISO 2022 based 8-bit encoding using SS2 for 96-charset"
08c19a27 406 '((ascii t) nil t nil
fec0e02d 407 nil ascii-eol ascii-cntl nil nil single-shift)
ccac3d77
KH
408 '((safe-charsets . t)
409 (composition . t)))
08c19a27 410
d49a4835 411(make-coding-system
cb5be6c9 412 'compound-text 2 ?x
73066974
EZ
413 "Compound text based generic encoding for decoding unknown messages.
414
e11cf111 415This coding system does not support extended segments."
5259f34b 416 '((ascii t) (latin-iso8859-1 katakana-jisx0201 t) t t
d49a4835
KH
417 nil ascii-eol ascii-cntl nil locking-shift single-shift nil nil nil
418 init-bol nil nil)
419 '((safe-charsets . t)
ccac3d77
KH
420 (mime-charset . x-ctext)
421 (composition . t)))
d49a4835 422
cb5be6c9
EZ
423(define-coding-system-alias 'x-ctext 'compound-text)
424(define-coding-system-alias 'ctext 'compound-text)
73066974 425
cb5be6c9
EZ
426;; Same as compound-text, but doesn't produce composition escape
427;; sequences. Used in post-read and pre-write conversions of
428;; compound-text-with-extensions, see mule.el. Note that this should
429;; not have a mime-charset property, to prevent it from showing up
430;; close to the beginning of coding systems ordered by priority.
73066974
EZ
431(make-coding-system
432 'ctext-no-compositions 2 ?x
433 "Compound text based generic encoding for decoding unknown messages.
434
cb5be6c9 435Like `compound-text', but does not produce escape sequences for compositions."
73066974
EZ
436 '((ascii t) (latin-iso8859-1 katakana-jisx0201 t) t t
437 nil ascii-eol ascii-cntl nil locking-shift single-shift nil nil nil
438 init-bol nil nil)
cb5be6c9 439 '((safe-charsets . t)))
73066974
EZ
440
441(make-coding-system
1e056d48 442 'compound-text-with-extensions 2 ?x
e11cf111 443 "Compound text encoding with extended segments.
73066974 444
1e056d48
KH
445See the variable `ctext-non-standard-encodings-alist' for the
446detail about how extended segments are handled.
447
73066974
EZ
448This coding system should be used only for X selections. It is inappropriate
449for decoding and encoding files, process I/O, etc."
1e056d48
KH
450 '((ascii t) (latin-iso8859-1 katakana-jisx0201 t) t t
451 nil ascii-eol ascii-cntl)
73066974
EZ
452 '((post-read-conversion . ctext-post-read-conversion)
453 (pre-write-conversion . ctext-pre-write-conversion)))
454
cb5be6c9
EZ
455(define-coding-system-alias
456 'x-ctext-with-extensions 'compound-text-with-extensions)
457(define-coding-system-alias
458 'ctext-with-extensions 'compound-text-with-extensions)
75b6fb58 459
f6eb8ace
KH
460(make-coding-system
461 'iso-safe 2 ?-
e11cf111 462 "Encode ASCII asis and encode non-ASCII characters to `?'."
f6eb8ace 463 '(ascii nil nil nil
fec0e02d 464 nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil t)
40e98681 465 '((safe-charsets ascii)))
f6eb8ace 466
9f13685a
KH
467(define-coding-system-alias
468 'us-ascii 'iso-safe)
469
435c388e
KH
470(make-coding-system
471 'iso-latin-1 2 ?1
472 "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)."
473 '(ascii latin-iso8859-1 nil nil
474 nil nil nil nil nil nil nil nil nil nil nil t t)
475 '((safe-charsets ascii latin-iso8859-1)
476 (mime-charset . iso-8859-1)))
477
478(define-coding-system-alias 'iso-8859-1 'iso-latin-1)
479(define-coding-system-alias 'latin-1 'iso-latin-1)
480
5b984695 481;; Use iso-safe for terminal output if some other coding system is not
e8dd0160 482;; specified explicitly.
f6eb8ace
KH
483(set-safe-terminal-coding-system-internal 'iso-safe)
484
08c19a27
KH
485;; The other coding-systems are defined in each language specific
486;; section of languages.el.
487
678dc7ec
RS
488;; Normally, set coding system to `undecided' before reading a file.
489;; Compiled Emacs Lisp files (*.elc) are not decoded at all,
490;; but we regard them as containing multibyte characters.
491;; Tar files are not decoded at all, but we treat them as raw bytes.
08c19a27 492
4951a271 493(setq file-coding-system-alist
2238f751 494 '(("\\.elc\\'" . (emacs-mule . emacs-mule))
bdf74bef 495 ("\\.utf\\(-8\\)?\\'" . utf-8)
3e88bb50
EZ
496 ;; We use raw-text for reading loaddefs.el so that if it
497 ;; happens to have DOS or Mac EOLs, they are converted to
498 ;; newlines. This is required to make the special treatment
499 ;; of the "\ newline" combination in loaddefs.el, which marks
500 ;; the beginning of a doc string, work.
501 ("\\(\\`\\|/\\)loaddefs.el\\'" . (raw-text . raw-text-unix))
2238f751 502 ("\\.tar\\'" . (no-conversion . no-conversion))
518a0981 503 ( "\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system)
0b606bb2 504 ("\\.tex\\|\\.ltx\\|\\.dtx\\|\\.drv\\'" . latexenc-find-file-coding-system)
4951a271 505 ("" . (undecided . nil))))
08c19a27
KH
506
507\f
508;;; Setting coding categories and their priorities.
509
510;; This setting is just to read an Emacs Lisp source files which
511;; contain multilingual text while dumping Emacs. More appropriate
2792ce16 512;; values are set by the command `set-language-environment' for each
08c19a27
KH
513;; language environment.
514
29742cb5
KH
515(setq coding-category-emacs-mule 'emacs-mule
516 coding-category-sjis 'japanese-shift-jis
517 coding-category-iso-7 'iso-2022-7bit
40e98681 518 coding-category-iso-7-tight 'iso-2022-jp
29742cb5 519 coding-category-iso-8-1 'iso-latin-1
5b984695 520 coding-category-iso-8-2 'iso-latin-1
29742cb5
KH
521 coding-category-iso-7-else 'iso-2022-7bit-lock
522 coding-category-iso-8-else 'iso-2022-8bit-ss2
a1223d6c 523 coding-category-ccl nil
f8499efb 524 coding-category-utf-8 'mule-utf-8
9ef9b28e
KH
525 coding-category-utf-16-be 'mule-utf-16be-with-signature
526 coding-category-utf-16-le 'mule-utf-16le-with-signature
29742cb5 527 coding-category-big5 'chinese-big5
2cb30410 528 coding-category-raw-text 'raw-text
29742cb5 529 coding-category-binary 'no-conversion)
08c19a27
KH
530
531(set-coding-priority
5b984695 532 '(coding-category-iso-8-1
69b73c8a 533 coding-category-iso-8-2
60ec9367
KH
534 coding-category-utf-8
535 coding-category-utf-16-be
536 coding-category-utf-16-le
5b984695
KH
537 coding-category-iso-7-tight
538 coding-category-iso-7
29742cb5 539 coding-category-iso-7-else
2cb30410 540 coding-category-iso-8-else
e4e6cfa0 541 coding-category-emacs-mule
2cb30410 542 coding-category-raw-text
a1506d29 543 coding-category-sjis
08c19a27 544 coding-category-big5
a1223d6c 545 coding-category-ccl
2c7794b0 546 coding-category-binary
60ec9367 547 ))
08c19a27 548
c1b628eb
KH
549\f
550;;; Miscellaneous settings.
e97c2306 551(aset latin-extra-code-table ?\221 t)
c1b628eb 552(aset latin-extra-code-table ?\222 t)
40232452
KH
553(aset latin-extra-code-table ?\223 t)
554(aset latin-extra-code-table ?\224 t)
b4026917 555(aset latin-extra-code-table ?\225 t)
e97c2306 556(aset latin-extra-code-table ?\226 t)
c1b628eb 557
4cb4b388
KH
558(update-coding-systems-internal)
559
c791cb54 560;; arch-tag: 7d5fed55-b6df-42f6-8d3d-0011190551f5
08c19a27 561;;; mule-conf.el ends here