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