mule-conf.el 16.8 KB
Newer Older
Karl Heuer's avatar
Karl Heuer committed
1 2 3
;;; mule-conf.el --- configure multilingual environment

;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
Richard M. Stallman's avatar
Richard M. Stallman committed
4
;; Licensed to the Free Software Foundation.
Karl Heuer's avatar
Karl Heuer committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

;; Keywords: mule, multilingual, character set, coding system

;; This file is part of GNU Emacs.

;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

;;; Commentary:

;; Don't byte-compile this file.

;;; Code:

;;; Definitions of character sets.

;; Basic (official) character sets.  These character sets are treated
Dave Love's avatar
Dave Love committed
34
;; efficiently with respect to buffer memory.
Karl Heuer's avatar
Karl Heuer committed
35 36 37 38 39 40 41 42 43

;; Syntax:
;; (define-charset CHARSET-ID CHARSET
;;   [ DIMENSION CHARS WIDTH DIRECTION ISO-FINAL-CHAR ISO-GRAPHIC-PLANE
;;     SHORT-NAME LONG-NAME DESCRIPTION ])
;; ASCII charset is defined in src/charset.c as below.
;; (define-charset 0 ascii
;;    [1 94 1 0 ?B 0 "ASCII" "ASCII" "ASCII (ISO646 IRV)"])

44 45 46 47
;; 1-byte charsets.  Valid range of CHARSET-ID is 128..143.

;; CHARSET-ID 128 is not used.

Karl Heuer's avatar
Karl Heuer committed
48
(define-charset 129 'latin-iso8859-1
49 50
  [1 96 1 0 ?A 1 "RHP of Latin-1" "RHP of Latin-1 (ISO 8859-1): ISO-IR-100"
     "Right-Hand Part of Latin Alphabet 1 (ISO/IEC 8859-1): ISO-IR-100"])
Karl Heuer's avatar
Karl Heuer committed
51
(define-charset 130 'latin-iso8859-2
52 53
  [1 96 1 0 ?B 1 "RHP of Latin-2" "RHP of Latin-2 (ISO 8859-2): ISO-IR-101"
     "Right-Hand Part of Latin Alphabet 2 (ISO/IEC 8859-2): ISO-IR-101"])
Karl Heuer's avatar
Karl Heuer committed
54
(define-charset 131 'latin-iso8859-3
55 56
  [1 96 1 0 ?C 1 "RHP of Latin-3" "RHP of Latin-3 (ISO 8859-3): ISO-IR-109"
     "Right-Hand Part of Latin Alphabet 3 (ISO/IEC 8859-3): ISO-IR-109"])
Karl Heuer's avatar
Karl Heuer committed
57
(define-charset 132 'latin-iso8859-4
58 59
  [1 96 1 0 ?D 1 "RHP of Latin-4" "RHP of Latin-4 (ISO 8859-4): ISO-IR-110"
     "Right-Hand Part of Latin Alphabet 4 (ISO/IEC 8859-4): ISO-IR-110"])
Karl Heuer's avatar
Karl Heuer committed
60
(define-charset 133 'thai-tis620
61 62
  [1 96 1 0 ?T 1 "RHP of TIS620" "RHP of Thai (TIS620): ISO-IR-166"
     "Right-Hand Part of TIS620.2533 (Thai): ISO-IR-166"])
Karl Heuer's avatar
Karl Heuer committed
63
(define-charset 134 'greek-iso8859-7
64 65
  [1 96 1 0 ?F 1 "RHP of ISO8859/7" "RHP of Greek (ISO 8859-7): ISO-IR-126"
     "Right-Hand Part of Latin/Greek Alphabet (ISO/IEC 8859-7): ISO-IR-126"])
Karl Heuer's avatar
Karl Heuer committed
66
(define-charset 135 'arabic-iso8859-6
67
  [1 96 1 1 ?G 1 "RHP of ISO8859/6" "RHP of Arabic (ISO 8859-6): ISO-IR-127"
Kenichi Handa's avatar
Kenichi Handa committed
68
     "Right-Hand Part of Latin/Arabic Alphabet (ISO/IEC 8859-6): ISO-IR-127"])
Karl Heuer's avatar
Karl Heuer committed
69
(define-charset 136 'hebrew-iso8859-8
70 71
  [1 96 1 1 ?H 1 "RHP of ISO8859/8" "RHP of Hebrew (ISO 8859-8): ISO-IR-138"
     "Right-Hand Part of Latin/Hebrew Alphabet (ISO/IEC 8859-8): ISO-IR-138"])
Karl Heuer's avatar
Karl Heuer committed
72
(define-charset 137 'katakana-jisx0201
73 74
  [1 94 1 0 ?I 1 "JISX0201 Katakana" "Japanese Katakana (JISX0201.1976)"
     "Katakana Part of JISX0201.1976"])
Karl Heuer's avatar
Karl Heuer committed
75
(define-charset 138 'latin-jisx0201
76 77
  [1 94 1 0 ?J 0 "JISX0201 Roman" "Japanese Roman (JISX0201.1976)"
     "Roman Part of JISX0201.1976"])
78 79 80

;; CHARSET-ID is not used 139.

Karl Heuer's avatar
Karl Heuer committed
81
(define-charset 140 'cyrillic-iso8859-5
82 83
  [1 96 1 0 ?L 1 "RHP of ISO8859/5" "RHP of Cyrillic (ISO 8859-5): ISO-IR-144"
     "Right-Hand Part of Latin/Cyrillic Alphabet (ISO/IEC 8859-5): ISO-IR-144"])
Karl Heuer's avatar
Karl Heuer committed
84
(define-charset 141 'latin-iso8859-9
85 86
  [1 96 1 0 ?M 1 "RHP of Latin-5" "RHP of Latin-5 (ISO 8859-9): ISO-IR-148"
     "Right-Hand Part of Latin Alphabet 5 (ISO/IEC 8859-9): ISO-IR-148"])
Dave Love's avatar
Dave Love committed
87
(define-charset 142 'latin-iso8859-15
88 89
  [1 96 1 0 ?b 1 "RHP of Latin-9" "RHP of Latin-9 (ISO 8859-15): ISO-IR-203"
     "Right-Hand Part of Latin Alphabet 9 (ISO/IEC 8859-15): ISO-IR-203"])
Dave Love's avatar
Dave Love committed
90
(define-charset 143 'latin-iso8859-14
91 92
  [1 96 1 0 ?_ 1 "RHP of Latin-8" "RHP of Latin-8 (ISO 8859-14)"
     "Right-Hand Part of Latin Alphabet 8 (ISO/IEC 8859-14)"])
93 94 95

;; 2-byte charsets.  Valid range of CHARSET-ID is 144..153.

Karl Heuer's avatar
Karl Heuer committed
96
(define-charset 144 'japanese-jisx0208-1978
97 98
  [2 94 2 0 ?@ 0 "JISX0208.1978" "JISX0208.1978 (Japanese): ISO-IR-42"
     "JISX0208.1978 Japanese Kanji (so called \"old JIS\"): ISO-IR-42"])
Karl Heuer's avatar
Karl Heuer committed
99
(define-charset 145 'chinese-gb2312
100 101
  [2 94 2 0 ?A 0 "GB2312" "GB2312: ISO-IR-58"
     "GB2312 Chinese simplified: ISO-IR-58"])
Karl Heuer's avatar
Karl Heuer committed
102
(define-charset 146 'japanese-jisx0208
103 104
  [2 94 2 0 ?B 0 "JISX0208" "JISX0208.1983/1990 (Japanese): ISO-IR-87"
     "JISX0208.1983/1990 Japanese Kanji: ISO-IR-87"])
Karl Heuer's avatar
Karl Heuer committed
105
(define-charset 147 'korean-ksc5601
106 107
  [2 94 2 0 ?C 0 "KSC5601" "KSC5601 (Korean): ISO-IR-149"
     "KSC5601 Korean Hangul and Hanja: ISO-IR-149"])
Karl Heuer's avatar
Karl Heuer committed
108
(define-charset 148 'japanese-jisx0212
109 110
  [2 94 2 0 ?D 0 "JISX0212" "JISX0212 (Japanese): ISO-IR-159"
     "JISX0212 Japanese supplement: ISO-IR-159"])
Karl Heuer's avatar
Karl Heuer committed
111
(define-charset 149 'chinese-cns11643-1
112 113
  [2 94 2 0 ?G 0 "CNS11643-1" "CNS11643-1 (Chinese traditional): ISO-IR-171"
     "CNS11643 Plane 1 Chinese traditional: ISO-IR-171"])
Karl Heuer's avatar
Karl Heuer committed
114
(define-charset 150 'chinese-cns11643-2
115 116
  [2 94 2 0 ?H 0 "CNS11643-2" "CNS11643-2 (Chinese traditional): ISO-IR-172"
     "CNS11643 Plane 2 Chinese traditional: ISO-IR-172"])
117 118
(define-charset 151 'japanese-jisx0213-1
  [2 94 2 0 ?O 0 "JISX0213-1" "JISX0213-1" "JISX0213 Plane 1 (Japanese)"])
Karl Heuer's avatar
Karl Heuer committed
119
(define-charset 152 'chinese-big5-1
120 121
  [2 94 2 0 ?0 0 "Big5 (Level-1)" "Big5 (Level-1) A141-C67F"
     "Frequentry used part (A141-C67F) of Big5 (Chinese traditional)"])
Karl Heuer's avatar
Karl Heuer committed
122
(define-charset 153 'chinese-big5-2
123 124
  [2 94 2 0 ?1 0 "Big5 (Level-2)" "Big5 (Level-2) C940-FEFE"
     "Less frequentry used part (C940-FEFE) of Big5 (Chinese traditional)"])
Karl Heuer's avatar
Karl Heuer committed
125 126

;; Additional (private) character sets.  These character sets are
Dave Love's avatar
Dave Love committed
127
;; treated less space-efficiently in the buffer.
Karl Heuer's avatar
Karl Heuer committed
128 129

;; Syntax:
130
;; (define-charset CHARSET-ID CHARSET
Karl Heuer's avatar
Karl Heuer committed
131 132 133 134 135 136 137 138
;;   [ DIMENSION CHARS WIDTH DIRECTION ISO-FINAL-CHAR ISO-GRAPHIC-PLANE
;;     SHORT-NAME LONG-NAME DESCRIPTION ])

;; ISO-2022 allows a use of character sets not registered in ISO with
;; final characters `0' (0x30) through `?' (0x3F).  Among them, Emacs
;; reserves `0' through `9' to support several private character sets.
;; The remaining final characters `:' through `?' are for users.

139 140 141
;; 1-byte 1-column charsets.  Valid range of CHARSET-ID is 160..223.

(define-charset 160 'chinese-sisheng
Karl Heuer's avatar
Karl Heuer committed
142 143 144 145
  [1 94 1 0 ?0 0 "SiSheng" "SiSheng (PinYin/ZhuYin)"
     "SiSheng characters for PinYin/ZhuYin"])

;; IPA characters for phonetic symbols.
146
(define-charset 161 'ipa
Karl Heuer's avatar
Karl Heuer committed
147 148 149 150 151 152
  [1 96 1 0 ?0 1 "IPA" "IPA" "IPA (International Phonetic Association)"])

;; Vietnamese VISCII.  VISCII is 1-byte character set which contains
;; more than 96 characters.  Since Emacs can't handle it as one
;; character set, it is divided into two: lower case letters and upper
;; case letters.
153
(define-charset 162 'vietnamese-viscii-lower
154
  [1 96 1 0 ?1 1 "VISCII lower" "VISCII lower-case" "VISCII1.1 lower-case"])
155
(define-charset 163 'vietnamese-viscii-upper
156
  [1 96 1 0 ?2 1 "VISCII upper" "VISCII upper-case" "VISCII1.1 upper-case"])
Karl Heuer's avatar
Karl Heuer committed
157 158 159 160 161

;; For Arabic, we need three different types of character sets.
;; Digits are of direction left-to-right and of width 1-column.
;; Others are of direction right-to-left and of width 1-column or
;; 2-column.
162
(define-charset 164 'arabic-digit
163
  [1 94 1 0 ?2 0 "Arabic digit" "Arabic digit" "Arabic digit"])
164
(define-charset 165 'arabic-1-column
165
  [1 94 1 1 ?3 0 "Arabic 1-col" "Arabic 1-column" "Arabic 1-column"])
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181

;; ASCII with right-to-left direction.
(define-charset 166 'ascii-right-to-left
  [1 94 1 1 ?B 0 "rev ASCII" "ASCII with right-to-left direction"
     "ASCII (left half of ISO 8859-1) with right-to-left direction"])

;; Lao script.
;; ISO10646's 0x0E80..0x0EDF are mapped to 0x20..0x7F.
(define-charset 167 'lao
  [1 94 1 0 ?1 0 "Lao" "Lao" "Lao characters (ISO10646 0E80..0EDF)"])

;; CHARSET-IDs 168..223 are not used.

;; 1-byte 2-column charsets.  Valid range of CHARSET-ID is 224..239.

(define-charset 224 'arabic-2-column
182
  [1 94 2 1 ?4 0 "Arabic 2-col" "Arabic 2-column" "Arabic 2-column"])
Karl Heuer's avatar
Karl Heuer committed
183

184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
;; Indian scripts.  Symbolic charset for data exchange.  Glyphs are
;; not assigned.  They are automatically converted to each Indian
;; script which IS-13194 supports.

(define-charset 225 'indian-is13194
  [1 94 2 0 ?5 1 "IS 13194" "Indian IS 13194"
     "Generic Indian charset for data exchange with IS 13194"])

;; CHARSET-IDs 226..239 are not used.

;; 2-byte 1-column charsets.  Valid range of CHARSET-ID is 240..244.

;; Actual Glyph for 1-column width.
(define-charset 240 'indian-1-column
  [2 94 1 0 ?6 0 "Indian 1-col" "Indian 1 Column"
     "Indian charset for 2-column width glyphs"])

(define-charset 241 'tibetan-1-column
  [2 94 1 0 ?8 0 "Tibetan 1-col" "Tibetan 1 column" "Tibetan 1 column glyph"])

;; CHARSET-IDs 242 and 243 are not used.

;; Subset of Unicode.
(define-charset 244 'mule-unicode-0100-24ff
  [2 96 1 0 ?1 0 "Unicode subset" "Unicode subset (U+0100..U+24FF)"
     "Unicode characters of the range U+0100..U+24FF."])

;; 2-byte 2-column charsets.  Valid range of CHARSET-ID is 245..254.

Karl Heuer's avatar
Karl Heuer committed
213
;; Ethiopic characters (Amahric and Tigrigna).
214
(define-charset 245 'ethiopic
215
  [2 94 2 0 ?3 0 "Ethiopic" "Ethiopic characters" "Ethiopic characters"])
Karl Heuer's avatar
Karl Heuer committed
216 217 218

;; Chinese CNS11643 Plane3 thru Plane7.  Although these are official
;; character sets, the use is rare and don't have to be treated
Dave Love's avatar
Dave Love committed
219
;; space-efficiently in the buffer.
220
(define-charset 246 'chinese-cns11643-3
221 222
  [2 94 2 0 ?I 0 "CNS11643-3" "CNS11643-3 (Chinese traditional): ISO-IR-183"
     "CNS11643 Plane 3 Chinese Traditional: ISO-IR-183"])
223
(define-charset 247 'chinese-cns11643-4
224 225
  [2 94 2 0 ?J 0 "CNS11643-4" "CNS11643-4 (Chinese traditional): ISO-IR-184"
     "CNS11643 Plane 4 Chinese Traditional: ISO-IR-184"])
226
(define-charset 248 'chinese-cns11643-5
227 228
  [2 94 2 0 ?K 0 "CNS11643-5" "CNS11643-5 (Chinese traditional): ISO-IR-185"
     "CNS11643 Plane 5 Chinese Traditional: ISO-IR-185"])
229
(define-charset 249 'chinese-cns11643-6
230 231
  [2 94 2 0 ?L 0 "CNS11643-6" "CNS11643-6 (Chinese traditional): ISO-IR-186"
     "CNS11643 Plane 6 Chinese Traditional: ISO-IR-186"])
232
(define-charset 250 'chinese-cns11643-7
233 234
  [2 94 2 0 ?M 0 "CNS11643-7" "CNS11643-7 (Chinese traditional): ISO-IR-187"
     "CNS11643 Plane 7 Chinese Traditional: ISO-IR-187"])
Karl Heuer's avatar
Karl Heuer committed
235 236

;; Actual Glyph for 2-column width.
237
(define-charset 251 'indian-2-column
238
  [2 94 2 0 ?5 0 "Indian 2-col" "Indian 2 Column"
Karl Heuer's avatar
Karl Heuer committed
239 240
     "Indian charset for 2-column width glyphs"])

241
;; Tibetan script.
242
(define-charset 252 'tibetan
243
  [2 94 2 0 ?7 0 "Tibetan 2-col" "Tibetan 2 column" "Tibetan characters"])
244 245 246 247 248 249

;; CHARSET-ID 253 is not used.

;; JISX0213 Plane 2
(define-charset 254 'japanese-jisx0213-2
  [2 94 2 0 ?P 0 "JISX0213-2" "JISX0213-2" "JISX0213 Plane 2 (Japanese)"])
250

251 252
;; Tell C code charset ID's of several charsets.
(setup-special-charsets)
Karl Heuer's avatar
Karl Heuer committed
253

254

Kenichi Handa's avatar
Kenichi Handa committed
255 256
;; These are tables for translating characters on decoding and
;; encoding.
257
(define-translation-table
Kenichi Handa's avatar
Kenichi Handa committed
258 259 260 261 262
  'oldjis-newjis-jisroman-ascii
  (list (cons (make-char 'japanese-jisx0208-1978)
	      (make-char 'japanese-jisx0208))
	(cons (make-char 'latin-jisx0201) (make-char 'ascii))))

263 264
(setq standard-translation-table-for-decode
      (get 'oldjis-newjis-jisroman-ascii 'translation-table))
Karl Heuer's avatar
Karl Heuer committed
265

266
(setq standard-translation-table-for-encode nil)
Karl Heuer's avatar
Karl Heuer committed
267 268 269 270 271 272 273 274


;;; Make fundamental coding systems.

;; Miscellaneous coding systems which can't be made by
;; `make-coding-system'.

(put 'no-conversion 'coding-system
275 276 277 278
     (vector nil ?= "Do no conversion"
	     (list 'coding-category 'coding-category-binary
		   'alias-coding-systems '(no-conversion))
	     nil))
Karl Heuer's avatar
Karl Heuer committed
279
(put 'no-conversion 'eol-type 0)
280 281 282
(put 'coding-category-binary 'coding-systems '(no-conversion))
(setq coding-system-list '(no-conversion))
(setq coding-system-alist '(("no-conversion")))
Karl Heuer's avatar
Karl Heuer committed
283

284 285
(define-coding-system-alias 'binary 'no-conversion)

286
(put 'undecided 'coding-system
287
     (vector t ?- "No conversion on encoding, automatic conversion on decoding"
288 289
	     (list 'alias-coding-systems '(undecided)
		   'safe-charsets '(ascii))
290 291 292
	     nil))
(setq coding-system-list (cons 'undecided coding-system-list))
(setq coding-system-alist (cons '("undecided") coding-system-alist))
293
(put 'undecided 'eol-type
294
     (make-subsidiary-coding-system 'undecided))
Karl Heuer's avatar
Karl Heuer committed
295

296
(define-coding-system-alias 'unix 'undecided-unix)
297 298 299
(define-coding-system-alias 'dos 'undecided-dos)
(define-coding-system-alias 'mac 'undecided-mac)

Karl Heuer's avatar
Karl Heuer committed
300 301 302
;; Coding systems not specific to each language environment.

(make-coding-system
303
 'emacs-mule 0 ?=
304
 "Emacs internal format used in buffer and string"
Kenichi Handa's avatar
Kenichi Handa committed
305 306
 nil
 '((safe-charsets . t)))
Karl Heuer's avatar
Karl Heuer committed
307

308 309
(make-coding-system
 'raw-text 5 ?t
310
 "Raw text, which means text contains random 8-bit codes."
Kenichi Handa's avatar
Kenichi Handa committed
311 312
 nil
 '((safe-charsets . t)))
313

Karl Heuer's avatar
Karl Heuer committed
314
(make-coding-system
Kenichi Handa's avatar
Kenichi Handa committed
315 316
 'iso-2022-7bit 2 ?J
 "ISO 2022 based 7-bit encoding using only G0"
Karl Heuer's avatar
Karl Heuer committed
317
 '((ascii t) nil nil nil
318
   short ascii-eol ascii-cntl seven)
319 320
 '((safe-charsets . t)
   (composition . t)))
Karl Heuer's avatar
Karl Heuer committed
321 322

(make-coding-system
323
 'iso-2022-7bit-ss2 2 ?$
Kenichi Handa's avatar
Kenichi Handa committed
324 325
 "ISO 2022 based 7-bit encoding using SS2 for 96-charset"
 '((ascii t) nil t nil
326
   short ascii-eol ascii-cntl seven nil single-shift)
327 328
 '((safe-charsets . t)
   (composition . t)))
Kenichi Handa's avatar
Kenichi Handa committed
329 330

(make-coding-system
331
 'iso-2022-7bit-lock 2 ?&
Kenichi Handa's avatar
Kenichi Handa committed
332 333
 "ISO-2022 coding system using Locking-Shift for 96-charset"
 '((ascii t) t nil nil
334
   nil ascii-eol ascii-cntl seven locking-shift)
335 336
 '((safe-charsets . t)
   (composition . t)))
Kenichi Handa's avatar
Kenichi Handa committed
337

338
(define-coding-system-alias 'iso-2022-int-1 'iso-2022-7bit-lock)
Karl Heuer's avatar
Karl Heuer committed
339 340

(make-coding-system
Kenichi Handa's avatar
Kenichi Handa committed
341
 'iso-2022-7bit-lock-ss2 2 ?i
342
 "Mixture of ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN"
Karl Heuer's avatar
Karl Heuer committed
343 344 345 346 347
 '((ascii t)
   (nil korean-ksc5601 chinese-gb2312 chinese-cns11643-1 t)
   (nil chinese-cns11643-2)
   (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
	chinese-cns11643-6 chinese-cns11643-7)
348
   short ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil
349
   init-bol)
350
 '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978 latin-jisx0201
Kenichi Handa's avatar
Kenichi Handa committed
351 352
		  korean-ksc5601 chinese-gb2312 chinese-cns11643-1
		  chinese-cns11643-2 chinese-cns11643-3 chinese-cns11643-4
353 354
		  chinese-cns11643-5 chinese-cns11643-6 chinese-cns11643-7)
   (composition . t)))
Karl Heuer's avatar
Karl Heuer committed
355

356
(define-coding-system-alias 'iso-2022-cjk 'iso-2022-7bit-lock-ss2)
Karl Heuer's avatar
Karl Heuer committed
357 358

(make-coding-system
Kenichi Handa's avatar
Kenichi Handa committed
359 360
 'iso-2022-8bit-ss2 2 ?@
 "ISO 2022 based 8-bit encoding using SS2 for 96-charset"
Karl Heuer's avatar
Karl Heuer committed
361
 '((ascii t) nil t nil
362
   nil ascii-eol ascii-cntl nil nil single-shift)
363 364
 '((safe-charsets . t)
   (composition . t)))
Karl Heuer's avatar
Karl Heuer committed
365

Kenichi Handa's avatar
Kenichi Handa committed
366 367 368 369 370 371 372
(make-coding-system
 'x-ctext 2 ?x
 "Compound text based generic encoding for decoding unknown messages."
 '((ascii t) (latin-iso8859-1 t) t t
   nil ascii-eol ascii-cntl nil locking-shift single-shift nil nil nil
   init-bol nil nil)
 '((safe-charsets . t)
373 374
   (mime-charset . x-ctext)
   (composition . t)))
Kenichi Handa's avatar
Kenichi Handa committed
375

Kenichi Handa's avatar
Kenichi Handa committed
376 377 378 379
(make-coding-system
 'iso-safe 2 ?-
 "Convert all characters but ASCII to `?'."
 '(ascii nil nil nil
380
   nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil t)
Kenichi Handa's avatar
Kenichi Handa committed
381
 '((safe-charsets ascii)))
Kenichi Handa's avatar
Kenichi Handa committed
382

383
;; Use iso-safe for terminal output if some other coding system is not
Karl Heuer's avatar
Karl Heuer committed
384
;; specified explicitly.
Kenichi Handa's avatar
Kenichi Handa committed
385 386
(set-safe-terminal-coding-system-internal 'iso-safe)

Karl Heuer's avatar
Karl Heuer committed
387 388 389
;; The other coding-systems are defined in each language specific
;; section of languages.el.

390 391 392 393
;; Normally, set coding system to `undecided' before reading a file.
;; Compiled Emacs Lisp files (*.elc) are not decoded at all,
;; but we regard them as containing multibyte characters.
;; Tar files are not decoded at all, but we treat them as raw bytes.
Karl Heuer's avatar
Karl Heuer committed
394

Kenichi Handa's avatar
Kenichi Handa committed
395
(setq file-coding-system-alist
396
      '(("\\.elc$" . (emacs-mule . emacs-mule))
397
	("\\(\\`\\|/\\)loaddefs.el$" . (no-conversion . no-conversion))
398
	("\\.tar$" . (no-conversion . no-conversion))
Kenichi Handa's avatar
Kenichi Handa committed
399
	("" . (undecided . nil))))
Karl Heuer's avatar
Karl Heuer committed
400 401 402 403 404 405


;;; Setting coding categories and their priorities.

;; This setting is just to read an Emacs Lisp source files which
;; contain multilingual text while dumping Emacs.  More appropriate
406
;; values are set by the command `set-language-environment' for each
Karl Heuer's avatar
Karl Heuer committed
407 408
;; language environment.

409 410 411
(setq coding-category-emacs-mule	'emacs-mule
      coding-category-sjis		'japanese-shift-jis
      coding-category-iso-7		'iso-2022-7bit
Kenichi Handa's avatar
Kenichi Handa committed
412
      coding-category-iso-7-tight	'iso-2022-jp
413
      coding-category-iso-8-1		'iso-latin-1
414
      coding-category-iso-8-2		'iso-latin-1
415 416
      coding-category-iso-7-else	'iso-2022-7bit-lock
      coding-category-iso-8-else	'iso-2022-8bit-ss2
417
      coding-category-ccl		nil
Kenichi Handa's avatar
Kenichi Handa committed
418 419 420
      coding-category-utf-8             nil
      coding-category-utf-16-be         nil
      coding-category-utf-16-le         nil
421
      coding-category-big5		'chinese-big5
422
      coding-category-raw-text		'raw-text
423
      coding-category-binary		'no-conversion)
Karl Heuer's avatar
Karl Heuer committed
424 425

(set-coding-priority
426
 '(coding-category-iso-8-1
427
   coding-category-iso-8-2
428 429
   coding-category-iso-7-tight
   coding-category-iso-7
430
   coding-category-iso-7-else
431
   coding-category-iso-8-else
432
   coding-category-emacs-mule
433
   coding-category-raw-text
Karl Heuer's avatar
Karl Heuer committed
434 435
   coding-category-sjis 
   coding-category-big5
436
   coding-category-ccl
Kenichi Handa's avatar
Kenichi Handa committed
437 438 439 440
   coding-category-binary
   coding-category-utf-16-be
   coding-category-utf-16-le
   coding-category-utf-8))
Karl Heuer's avatar
Karl Heuer committed
441

Kenichi Handa's avatar
Kenichi Handa committed
442 443 444 445

;;; Miscellaneous settings.
(aset latin-extra-code-table ?\222 t)

446 447
(update-coding-systems-internal)

Karl Heuer's avatar
Karl Heuer committed
448
;;; mule-conf.el ends here