comparison lisp/language/european.el @ 89483:2f877ed80fa6

*** empty log message ***
author Kenichi Handa <handa@m17n.org>
date Mon, 08 Sep 2003 12:53:41 +0000
parents 375f2633d815 5f226da850bf
children 3a4e30359ac0
comparison
equal deleted inserted replaced
88123:375f2633d815 89483:2f877ed80fa6
1 ;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*- 1 ;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*-
2 2
3 ;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN. 3 ;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation. 4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 5 ;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
6 ;; Copyright (C) 2003
7 ;; National Institute of Advanced Industrial Science and Technology (AIST)
8 ;; Registration Number H13PRO009
6 9
7 ;; Keywords: multilingual, European 10 ;; Keywords: multilingual, European
8 11
9 ;; This file is part of GNU Emacs. 12 ;; This file is part of GNU Emacs.
10 13
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 26 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA. 27 ;; Boston, MA 02111-1307, USA.
25 28
26 ;;; Commentary: 29 ;;; Commentary:
27 30
28 ;; For European scripts, character sets ISO8859-1,2,3,4,9,14,15 are 31 ;; For European scripts, character sets ISO8859-1,2,3,4,9,10,13,14,15,
29 ;; supported. 32 ;; windows-1250,2,4,7, mac-roman, adobe-standard-encoding, cp850 and
33 ;; next are supported.
30 34
31 ;;; Code: 35 ;;; Code:
32 36
33 ;; Latin-1 (ISO-8859-1) 37 ;; Latin-1 (ISO-8859-1)
34 38
35 (set-language-info-alist 39 (set-language-info-alist
36 "Latin-1" '((charset ascii latin-iso8859-1) 40 "Latin-1" '((charset iso-8859-1)
37 (coding-system iso-latin-1) 41 (coding-system iso-latin-1 iso-latin-9 windows-1252)
38 (coding-priority iso-latin-1) 42 (coding-priority iso-latin-1)
39 (nonascii-translation . latin-iso8859-1) 43 (nonascii-translation . iso-8859-1)
40 (unibyte-syntax . "latin-1")
41 (unibyte-display . iso-latin-1) 44 (unibyte-display . iso-latin-1)
42 (input-method . "latin-1-prefix") 45 (input-method . "latin-1-prefix")
43 (sample-text 46 (sample-text
44 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") 47 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
45 (documentation . "\ 48 (documentation . "\
63 '("European")) 66 '("European"))
64 67
65 68
66 ;; Latin-2 (ISO-8859-2) 69 ;; Latin-2 (ISO-8859-2)
67 70
68 (make-coding-system 71 (define-coding-system 'iso-latin-2
69 'iso-latin-2 2 ?2 72 "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."
70 "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)." 73 :coding-type 'charset
71 '(ascii latin-iso8859-2 nil nil 74 :mnemonic ?2
72 nil nil nil nil nil nil nil nil nil nil nil t) 75 :charset-list '(iso-8859-2)
73 '((safe-charsets ascii latin-iso8859-2) 76 :mime-charset 'iso-8859-2)
74 (mime-charset . iso-8859-2)))
75 77
76 (define-coding-system-alias 'iso-8859-2 'iso-latin-2) 78 (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
77 (define-coding-system-alias 'latin-2 'iso-latin-2) 79 (define-coding-system-alias 'latin-2 'iso-latin-2)
78 80
79 (set-language-info-alist 81 (set-language-info-alist
80 "Latin-2" '((charset ascii latin-iso8859-2) 82 "Latin-2" '((charset iso-8859-2)
81 (coding-system iso-latin-2) 83 (coding-system iso-latin-2 windows-1250)
82 (coding-priority iso-latin-2) 84 (coding-priority iso-latin-2)
83 (nonascii-translation . latin-iso8859-2) 85 (nonascii-translation . iso-8859-2)
84 (unibyte-syntax . "latin-2")
85 (unibyte-display . iso-latin-2) 86 (unibyte-display . iso-latin-2)
86 (input-method . "latin-2-prefix") 87 (input-method . "latin-2-prefix")
87 (documentation . "\ 88 (documentation . "\
88 This language environment is a generic one for the Latin-2 (ISO-8859-2) 89 This language environment is a generic one for the Latin-2 (ISO-8859-2)
89 character set which supports the following languages: 90 character set which supports the following languages:
91 Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower), 92 Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower),
92 and Swedish. 93 and Swedish.
93 We also have specific language environments for the following languages: 94 We also have specific language environments for the following languages:
94 For Czech, \"Czech\". 95 For Czech, \"Czech\".
95 For Croatian, \"Croatian\". 96 For Croatian, \"Croatian\".
97 For Polish, \"Polish\".
96 For Romanian, \"Romanian\". 98 For Romanian, \"Romanian\".
97 For Slovak, \"Slovak\".")) 99 For Slovak, \"Slovak\"."))
98 '("European")) 100 '("European"))
99 101
100 102
101 ;; Latin-3 (ISO-8859-3) 103 ;; Latin-3 (ISO-8859-3)
102 104
103 (make-coding-system 105 (define-coding-system 'iso-latin-3
104 'iso-latin-3 2 ?3 106 "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."
105 "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)." 107 :coding-type 'charset
106 '(ascii latin-iso8859-3 nil nil 108 :mnemonic ?3
107 nil nil nil nil nil nil nil nil nil nil nil t) 109 :charset-list '(iso-8859-3)
108 '((safe-charsets ascii latin-iso8859-3) 110 :mime-charset 'iso-8859-3)
109 (mime-charset . iso-8859-3)))
110 111
111 (define-coding-system-alias 'iso-8859-3 'iso-latin-3) 112 (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
112 (define-coding-system-alias 'latin-3 'iso-latin-3) 113 (define-coding-system-alias 'latin-3 'iso-latin-3)
113 114
114 (set-language-info-alist 115 (set-language-info-alist
115 "Latin-3" '((charset ascii latin-iso8859-3) 116 "Latin-3" '((charset iso-8859-3)
116 (coding-system iso-latin-3) 117 (coding-system iso-latin-3)
117 (coding-priority iso-latin-3) 118 (coding-priority iso-latin-3)
118 (nonascii-translation . latin-iso8859-3) 119 (nonascii-translation . iso-8859-3)
119 (unibyte-syntax . "latin-3")
120 (unibyte-display . iso-latin-3) 120 (unibyte-display . iso-latin-3)
121 (input-method . "latin-3-prefix") 121 (input-method . "latin-3-prefix")
122 (documentation . "\ 122 (documentation . "\
123 These languages are supported with the Latin-3 (ISO-8859-3) character set: 123 These languages are supported with the Latin-3 (ISO-8859-3) character set:
124 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician, 124 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
126 '("European")) 126 '("European"))
127 127
128 128
129 ;; Latin-4 (ISO-8859-4) 129 ;; Latin-4 (ISO-8859-4)
130 130
131 (make-coding-system 131 (define-coding-system 'iso-latin-4
132 'iso-latin-4 2 ?4 132 "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."
133 "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)." 133 :coding-type 'charset
134 '(ascii latin-iso8859-4 nil nil 134 :mnemonic ?4
135 nil nil nil nil nil nil nil nil nil nil nil t) 135 :charset-list '(iso-8859-4)
136 '((safe-charsets ascii latin-iso8859-4) 136 :mime-charset 'iso-8859-4)
137 (mime-charset . iso-8859-4)))
138 137
139 (define-coding-system-alias 'iso-8859-4 'iso-latin-4) 138 (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
140 (define-coding-system-alias 'latin-4 'iso-latin-4) 139 (define-coding-system-alias 'latin-4 'iso-latin-4)
141 140
142 (set-language-info-alist 141 (set-language-info-alist
143 "Latin-4" '((charset ascii latin-iso8859-4) 142 "Latin-4" '((charset iso-8859-4)
144 (coding-system iso-8859-4) 143 (coding-system iso-8859-4)
145 (coding-priority iso-8859-4) 144 (coding-priority iso-8859-4)
146 (nonascii-translation . latin-iso8859-4) 145 (nonascii-translation . iso-8859-4)
147 (unibyte-syntax . "latin-4")
148 (unibyte-display . iso-8859-4) 146 (unibyte-display . iso-8859-4)
149 (input-method . "latin-4-postfix") 147 (input-method . "latin-4-postfix")
150 (documentation . "\ 148 (documentation . "\
151 These languages are supported with the Latin-4 (ISO-8859-4) character set: 149 These languages are supported with the Latin-4 (ISO-8859-4) character set:
152 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, 150 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
154 '("European")) 152 '("European"))
155 153
156 154
157 ;; Latin-5 (ISO-8859-9) 155 ;; Latin-5 (ISO-8859-9)
158 156
159 (make-coding-system 157 (define-coding-system 'iso-latin-5
160 'iso-latin-5 2 ?9 158 "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."
161 "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)." 159 :coding-type 'charset
162 '(ascii latin-iso8859-9 nil nil 160 :mnemonic ?9
163 nil nil nil nil nil nil nil nil nil nil nil t) 161 :charset-list '(iso-8859-9)
164 '((safe-charsets ascii latin-iso8859-9) 162 :mime-charset 'iso-8859-9)
165 (mime-charset . iso-8859-9)))
166 163
167 (define-coding-system-alias 'iso-8859-9 'iso-latin-5) 164 (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
168 (define-coding-system-alias 'latin-5 'iso-latin-5) 165 (define-coding-system-alias 'latin-5 'iso-latin-5)
169 166
170 (set-language-info-alist 167 (set-language-info-alist
171 "Latin-5" '((charset ascii latin-iso8859-9) 168 "Latin-5" '((charset iso-8859-9)
172 (coding-system iso-latin-5) 169 (coding-system iso-latin-5)
173 (coding-priority iso-latin-5) 170 (coding-priority iso-latin-5)
174 (nonascii-translation . latin-iso8859-9) 171 (nonascii-translation . iso-8859-9)
175 (unibyte-syntax . "latin-5")
176 (unibyte-display . iso-latin-5) 172 (unibyte-display . iso-latin-5)
177 (input-method . "latin-5-postfix") 173 (input-method . "latin-5-postfix")
178 (documentation . "Support for Turkish language.")) 174 (documentation . "Support for Latin-5.\
179 '("European")) 175 See also the Turkish environment."))
180 176 '("European"))
177
178
179 ;; Latin-6 (ISO-8859-10)
180
181 (define-coding-system 'iso-latin-6
182 "ISO 2022 based 8-bit encoding for Latin-6 (MIME:ISO-8859-10)."
183 :coding-type 'charset
184 :mnemonic ?9
185 :charset-list '(iso-8859-10)
186 :mime-charset 'iso-8859-10)
187
188 (define-coding-system-alias 'iso-8859-10 'iso-latin-6)
189 (define-coding-system-alias 'latin-6 'iso-latin-6)
190
191 (set-language-info-alist
192 "Latin-6" '((charset iso-8859-10)
193 (coding-system iso-latin-6)
194 (coding-priority iso-latin-6)
195 (nonascii-translation . iso-8859-10)
196 (unibyte-display . iso-latin-6)
197 ;; Fixme: input method.
198 (documentation . "Support for generic Latin-6 (Northern European)."))
199 '("European"))
200
201
202 ;; Latin-7 (ISO-8859-13)
203
204 (define-coding-system 'iso-latin-7
205 "ISO 2022 based 8-bit encoding for Latin-7 (MIME:ISO-8859-13)."
206 :coding-type 'charset
207 :mnemonic ?9
208 :charset-list '(iso-8859-13)
209 :mime-charset 'iso-8859-13)
210
211 (define-coding-system-alias 'iso-8859-13 'iso-latin-7)
212 (define-coding-system-alias 'latin-7 'iso-latin-7)
213
214 (set-language-info-alist
215 "Latin-7" '((charset iso-8859-13)
216 (coding-system iso-latin-7)
217 (coding-priority iso-latin-7)
218 (nonascii-translation . iso-8859-13)
219 (unibyte-display . iso-latin-7)
220 ;; Fixme: input method.
221 (documentation . "Support for generic Latin-7 (Baltic Rim)."))
222 '("European"))
181 223
182 ;; Latin-8 (ISO-8859-14) 224 ;; Latin-8 (ISO-8859-14)
183 225
184 (make-coding-system 226 (define-coding-system 'iso-latin-8
185 'iso-latin-8 2 ?W ; `W' for `Welsh', since `C' 227 "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."
186 ; for `Celtic' is taken. 228 :coding-type 'charset
187 "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)." 229 ;; `W' for `Welsh', since `C' for `Celtic' is taken.
188 '(ascii latin-iso8859-14 nil nil 230 :mnemonic ?W
189 nil nil nil nil nil nil nil nil nil nil nil t t) 231 :charset-list '(iso-8859-14)
190 '((safe-charsets ascii latin-iso8859-14) 232 :mime-charset 'iso-8859-14)
191 (mime-charset . iso-8859-14)))
192 233
193 (define-coding-system-alias 'iso-8859-14 'iso-latin-8) 234 (define-coding-system-alias 'iso-8859-14 'iso-latin-8)
194 (define-coding-system-alias 'latin-8 'iso-latin-8) 235 (define-coding-system-alias 'latin-8 'iso-latin-8)
195 236
196 (set-language-info-alist 237 (set-language-info-alist
197 "Latin-8" '((charset ascii latin-iso8859-14) 238 "Latin-8" '((charset iso-8859-14)
198 (coding-system iso-latin-8) 239 (coding-system iso-latin-8)
199 (coding-priority iso-latin-8) 240 (coding-priority iso-latin-8)
200 (nonascii-translation . latin-iso8859-14) 241 (nonascii-translation . iso-8859-14)
201 (unibyte-syntax . "latin-8")
202 (unibyte-display . iso-latin-8) 242 (unibyte-display . iso-latin-8)
203 (input-method . "latin-8-prefix") 243 (input-method . "latin-8-prefix")
204 ;; Fixme: Welsh/Ga{e}lic greetings 244 ;; Fixme: Welsh/Ga{e}lic greetings
205 (sample-text . ",_"(B ,_p(B ,_^(B") 245 (sample-text . ",_"(B ,_p(B ,_^(B")
206 (documentation . "\ 246 (documentation . "\
210 Welsh, Manx Gaelic and Irish Gaelic (old orthography).")) 250 Welsh, Manx Gaelic and Irish Gaelic (old orthography)."))
211 '("European")) 251 '("European"))
212 252
213 ;; Latin-9 (ISO-8859-15) 253 ;; Latin-9 (ISO-8859-15)
214 254
215 (make-coding-system 255 (define-coding-system 'iso-latin-9
216 'iso-latin-9 2 ?0 ; `0' for `Latin-0' 256 "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."
217 "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)." 257 :coding-type 'charset
218 '(ascii latin-iso8859-15 nil nil 258 ;; `0' for `Latin-0'
219 nil nil nil nil nil nil nil nil nil nil nil t t) 259 :mnemonic ?0
220 '((safe-charsets ascii latin-iso8859-15) 260 :charset-list '(iso-8859-15)
221 (mime-charset . iso-8859-15))) 261 :mime-charset 'iso-8859-15)
222 262
223 (define-coding-system-alias 'iso-8859-15 'iso-latin-9) 263 (define-coding-system-alias 'iso-8859-15 'iso-latin-9)
224 (define-coding-system-alias 'latin-9 'iso-latin-9) 264 (define-coding-system-alias 'latin-9 'iso-latin-9)
225 (define-coding-system-alias 'latin-0 'iso-latin-9) 265 (define-coding-system-alias 'latin-0 'iso-latin-9)
226 266
227 (set-language-info-alist 267 (set-language-info-alist
228 "Latin-9" '((charset ascii latin-iso8859-15) 268 "Latin-9" '((charset iso-8859-15)
229 (coding-system iso-latin-9) 269 (coding-system iso-latin-9)
230 (coding-priority iso-latin-9) 270 (coding-priority iso-latin-9)
231 (nonascii-translation . latin-iso8859-15) 271 (nonascii-translation . iso-8859-15)
232 (unibyte-syntax . "latin-9")
233 (unibyte-display . iso-latin-9) 272 (unibyte-display . iso-latin-9)
234 (input-method . "latin-9-prefix") 273 (input-method . "latin-9-prefix")
235 (sample-text 274 (sample-text
236 . "AVE. ,b&(48<=>(B ,b$(B") 275 . "AVE. ,b&(48<=>(B ,b$(B")
237 (documentation . "\ 276 (documentation . "\
239 character set which supports the same languages as Latin-1 with the 278 character set which supports the same languages as Latin-1 with the
240 addition of the Euro sign and some additional French and Finnish letters. 279 addition of the Euro sign and some additional French and Finnish letters.
241 Latin-9 is sometimes nicknamed `Latin-0'.")) 280 Latin-9 is sometimes nicknamed `Latin-0'."))
242 '("European")) 281 '("European"))
243 282
283 (define-coding-system 'windows-1250
284 "windows-1250 (Central European) encoding (MIME: WINDOWS-1250)"
285 :coding-type 'charset
286 :mnemonic ?*
287 :charset-list '(windows-1250)
288 :mime-charset 'windows-1250)
289 (define-coding-system-alias 'cp1250 'windows-1250)
290
291 (define-coding-system 'windows-1252
292 "windows-1252 (Western European) encoding (MIME: WINDOWS-1252)"
293 :coding-type 'charset
294 :mnemonic ?*
295 :charset-list '(windows-1252)
296 :mime-charset 'windows-1252)
297 (define-coding-system-alias 'cp1252 'windows-1252)
298
299 (define-coding-system 'windows-1254
300 "windows-1254 (Turkish) encoding (MIME: WINDOWS-1254)"
301 :coding-type 'charset
302 :mnemonic ?*
303 :charset-list '(windows-1254)
304 :mime-charset 'windows-1254)
305 (define-coding-system-alias 'cp1254 'windows-1254)
306
307 (define-coding-system 'windows-1257
308 "windows-1257 (Baltic) encoding (MIME: WINDOWS-1257)"
309 :coding-type 'charset
310 :mnemonic ?*
311 :charset-list '(windows-1257)
312 :mime-charset 'windows-1257)
313 (define-coding-system-alias 'cp1257 'windows-1257)
314
315 (define-coding-system 'cp850
316 "DOS codepage 850 (Western European)"
317 :coding-type 'charset
318 :mnemonic ?D
319 :charset-list '(cp850)
320 :mime-charset 'cp850)
321 (define-coding-system-alias 'ibm850 'cp850)
322
323 (define-coding-system 'cp852
324 "DOS codepage 852 (Slavic)"
325 :coding-type 'charset
326 :mnemonic ?D
327 :charset-list '(cp852)
328 :mime-charset 'cp852)
329 (define-coding-system-alias 'ibm852 'cp852)
330
331 (define-coding-system 'cp857
332 "DOS codepage 857 (Turkish)"
333 :coding-type 'charset
334 :mnemonic ?D
335 :charset-list '(cp857)
336 :mime-charset 'cp857)
337 (define-coding-system-alias 'ibm857 'cp857)
338
339 (define-coding-system 'cp858
340 "Codepage 858 (Multilingual Latin I + Euro)"
341 :coding-type 'charset
342 :mnemonic ?D
343 :charset-list '(cp858)
344 :mime-charset 'cp858)
345
346 (define-coding-system 'cp860
347 "DOS codepage 860 (Portuguese)"
348 :coding-type 'charset
349 :mnemonic ?D
350 :charset-list '(cp860)
351 :mime-charset 'cp860)
352 (define-coding-system-alias 'ibm860 'cp860)
353
354 (define-coding-system 'cp861
355 "DOS codepage 861 (Icelandic)"
356 :coding-type 'charset
357 :mnemonic ?D
358 :charset-list '(cp861)
359 :mime-charset 'cp861)
360 (define-coding-system-alias 'ibm861 'cp861)
361
362 (define-coding-system 'cp863
363 "DOS codepage 863 (French Canadian)"
364 :coding-type 'charset
365 :mnemonic ?D
366 :charset-list '(cp863)
367 :mime-charset 'cp863)
368 (define-coding-system-alias 'ibm863 'cp863)
369
370 (define-coding-system 'cp865
371 "DOS codepage 865 (Norwegian/Danish)"
372 :coding-type 'charset
373 :mnemonic ?D
374 :charset-list '(cp865)
375 :mime-charset 'cp865)
376 (define-coding-system-alias 'ibm865 'cp865)
377
378 (define-coding-system 'cp437
379 "DOS codepage 437"
380 :coding-type 'charset
381 :mnemonic ?D
382 :charset-list '(cp437)
383 :mime-charset 'cp437)
384 (define-coding-system-alias 'ibm437 'cp437)
385
244 (set-language-info-alist 386 (set-language-info-alist
245 "Dutch" '((tutorial . "TUTORIAL.nl") 387 "Dutch" '((tutorial . "TUTORIAL.nl")
246 (charset ascii latin-iso8859-1) 388 (charset iso-8859-1)
247 (coding-system iso-latin-1 iso-latin-9) 389 (coding-system iso-latin-1 iso-latin-9)
248 (coding-priority iso-latin-1) 390 (coding-priority iso-latin-1)
249 (nonascii-translation . latin-iso8859-1) 391 (nonascii-translation . iso-8859-1)
250 (unibyte-syntax . "latin-1")
251 (unibyte-display . iso-latin-1) 392 (unibyte-display . iso-latin-1)
252 (input-method . "dutch") 393 (input-method . "dutch")
253 (sample-text . "Er is een aantal manieren waarop je dit kan doen") 394 (sample-text . "Er is een aantal manieren waarop je dit kan doen")
254 (documentation . "\ 395 (documentation . "\
255 This language environment is almost the same as Latin-1, 396 This language environment is almost the same as Latin-1,
256 but it selects the Dutch tutorial and input method.")) 397 but it selects the Dutch tutorial and input method."))
257 '("European")) 398 '("European"))
258 399
259 (set-language-info-alist 400 (set-language-info-alist
260 "German" '((tutorial . "TUTORIAL.de") 401 "German" '((tutorial . "TUTORIAL.de")
261 (charset ascii latin-iso8859-1) 402 (charset iso-8859-1)
262 (coding-system iso-latin-1 iso-latin-9) 403 (coding-system iso-latin-1 iso-latin-9)
263 (coding-priority iso-latin-1) 404 (coding-priority iso-latin-1)
405 (nonascii-translation . iso-8859-1)
264 (input-method . "german-postfix") 406 (input-method . "german-postfix")
265 (nonascii-translation . latin-iso8859-1)
266 (unibyte-syntax . "latin-1")
267 (unibyte-display . iso-latin-1) 407 (unibyte-display . iso-latin-1)
268 (sample-text . "\ 408 (sample-text . "\
269 German (Deutsch Nord) Guten Tag 409 German (Deutsch Nord) Guten Tag
270 German (Deutsch S,A|(Bd) Gr,A|_(B Gott") 410 German (Deutsch S,A|(Bd) Gr,A|_(B Gott")
271 (documentation . "\ 411 (documentation . "\
274 Additionally, it selects the German tutorial.")) 414 Additionally, it selects the German tutorial."))
275 '("European")) 415 '("European"))
276 416
277 (set-language-info-alist 417 (set-language-info-alist
278 "French" '((tutorial . "TUTORIAL.fr") 418 "French" '((tutorial . "TUTORIAL.fr")
279 (charset ascii latin-iso8859-1) 419 (charset iso-8859-1)
280 (coding-system iso-latin-1 iso-latin-9) 420 (coding-system iso-latin-1 iso-latin-9)
281 (coding-priority iso-latin-1) 421 (coding-priority iso-latin-1)
282 (nonascii-translation . latin-iso8859-1) 422 (nonascii-translation . iso-8859-1)
283 (unibyte-syntax . "latin-1")
284 (unibyte-display . iso-latin-1) 423 (unibyte-display . iso-latin-1)
285 (input-method . "latin-1-prefix") 424 (input-method . "latin-1-prefix")
286 (sample-text . "French (Fran,Ag(Bais) Bonjour, Salut") 425 (sample-text . "French (Fran,Ag(Bais) Bonjour, Salut")
287 (documentation . "\ 426 (documentation . "\
288 This language environment is almost the same as Latin-1, 427 This language environment is almost the same as Latin-1,
289 but it selects the French tutorial and input method.")) 428 but it selects the French tutorial and input method."))
290 '("European")) 429 '("European"))
291 430
292 (set-language-info-alist 431 (set-language-info-alist
293 "Italian" '((tutorial . "TUTORIAL.it") 432 "Italian" '((tutorial . "TUTORIAL.it")
294 (charset ascii latin-iso8859-1) 433 (charset iso-8859-1)
295 (coding-system iso-latin-1 iso-latin-9) 434 (coding-system iso-latin-1 iso-latin-9)
296 (coding-priority iso-latin-1) 435 (coding-priority iso-latin-1)
297 (nonascii-translation . latin-iso8859-1) 436 (nonascii-translation . iso-8859-1)
298 (unibyte-syntax . "latin-1")
299 (unibyte-display . iso-latin-1) 437 (unibyte-display . iso-latin-1)
300 (input-method . "italian-postfix") 438 (input-method . "italian-postfix")
301 (sample-text . "Salve, ciao!") 439 (sample-text . "Salve, ciao!")
302 (documentation . "\ 440 (documentation . "\
303 This language environment is almost the same as Latin-1, 441 This language environment is almost the same as Latin-1,
304 but sets the default input method to \"italian-postfix\". 442 but sets the default input method to \"italian-postfix\".
305 Additionally, it selects the Italian tutorial.")) 443 Additionally, it selects the Italian tutorial."))
306 '("European")) 444 '("European"))
307 445
308 (set-language-info-alist 446 (set-language-info-alist
309 "Slovenian" '((charset . (ascii latin-iso8859-2)) 447 "Slovenian" '((charset iso-8859-2)
310 (coding-system . (iso-8859-2)) 448 (coding-system . (iso-8859-2 windows-1250))
311 (coding-priority . (iso-8859-2)) 449 (coding-priority . (iso-8859-2))
312 (nonascii-translation . latin-iso8859-2) 450 (nonascii-translation . iso-8859-2)
313 (input-method . "slovenian") 451 (input-method . "slovenian")
314 (unibyte-syntax . "latin-2")
315 (unibyte-display . iso-8859-2) 452 (unibyte-display . iso-8859-2)
316 (tutorial . "TUTORIAL.sl") 453 (tutorial . "TUTORIAL.sl")
317 (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!") 454 (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!")
318 (documentation . "\ 455 (documentation . "\
319 This language environment is almost the same as Latin-2, 456 This language environment is almost the same as Latin-2,
320 but it selects the Slovenian tutorial and input method.")) 457 but it selects the Slovenian tutorial and input method."))
321 '("European")) 458 '("European"))
322 459
323 (set-language-info-alist 460 (set-language-info-alist
324 "Spanish" '((tutorial . "TUTORIAL.es") 461 "Spanish" '((tutorial . "TUTORIAL.es")
325 (charset ascii latin-iso8859-1) 462 (charset iso-8859-1)
326 (coding-system iso-latin-1 iso-latin-9) 463 (coding-system iso-latin-1 iso-latin-9)
327 (coding-priority iso-latin-1) 464 (coding-priority iso-latin-1)
328 (input-method . "spanish-postfix") 465 (input-method . "spanish-postfix")
329 (nonascii-translation . latin-iso8859-1) 466 (nonascii-translation . iso-8859-1)
330 (unibyte-syntax . "latin-1")
331 (unibyte-display . iso-latin-1) 467 (unibyte-display . iso-latin-1)
332 (sample-text . "Spanish (Espa,Aq(Bol) ,A!(BHola!") 468 (sample-text . "Spanish (Espa,Aq(Bol) ,A!(BHola!")
333 (documentation . "\ 469 (documentation . "\
334 This language environment is almost the same as Latin-1, 470 This language environment is almost the same as Latin-1,
335 but it sets the default input method to \"spanish-postfix\", 471 but it sets the default input method to \"spanish-postfix\",
340 ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3) 476 ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3)
341 ;; was used for Turkish. Those who use Latin-3 for Turkish should use 477 ;; was used for Turkish. Those who use Latin-3 for Turkish should use
342 ;; "Latin-3" language environment. 478 ;; "Latin-3" language environment.
343 479
344 (set-language-info-alist 480 (set-language-info-alist
345 "Turkish" '((charset ascii latin-iso8859-9) 481 "Turkish" '((charset iso-8859-9)
346 (coding-system iso-latin-5 iso-latin-3) 482 (coding-system iso-latin-5 windows-1254 iso-latin-3)
347 (coding-priority iso-latin-5) 483 (coding-priority iso-latin-5)
348 (nonascii-translation . latin-iso8859-9) 484 (nonascii-translation . iso-8859-9)
349 (unibyte-syntax . "latin-5")
350 (unibyte-display . iso-latin-5) 485 (unibyte-display . iso-latin-5)
351 (input-method . "turkish-postfix") 486 (input-method . "turkish-postfix")
352 (sample-text . "Turkish (T,M|(Brk,Mg(Be) Merhaba") 487 (sample-text . "Turkish (T,M|(Brk,Mg(Be) Merhaba")
353 (documentation . t))) 488 (setup-function
489 . (lambda ()
490 (set-case-syntax-pair ?I ?,C9(B (standard-case-table))
491 (set-case-syntax-pair ?,C)(B ?i (standard-case-table))))
492 (exit-function
493 . (lambda ()
494 (set-case-syntax-pair ?I ?i (standard-case-table))
495 (set-case-syntax ?,C9(B "w" (standard-case-table))
496 (set-case-syntax ?,C)(B "w" (standard-case-table))))
497 (documentation . "Support for Turkish.
498 Differs from the Latin-5 environment in using the `turkish-postfix' input
499 method and applying Turkish case rules for the characters i, I, ,C9(B, ,C)(B.")))
354 500
355 ;; Polish ISO 8859-2 environment. 501 ;; Polish ISO 8859-2 environment.
356 ;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl> 502 ;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl>
357 ;; Keywords: multilingual, Polish 503 ;; Keywords: multilingual, Polish
358 504
359 (set-language-info-alist 505 (set-language-info-alist
360 "Polish" '((charset . (ascii latin-iso8859-2)) 506 "Polish" '((charset iso-8859-2)
361 (coding-system . (iso-8859-2)) 507 (coding-system iso-8859-2 windows-1250)
362 (coding-priority . (iso-8859-2)) 508 (coding-priority iso-8859-2)
363 (input-method . "polish-slash") 509 (input-method . "polish-slash")
364 (nonascii-translation . latin-iso8859-2) 510 (nonascii-translation . iso-8859-2)
365 (unibyte-syntax . "latin-2")
366 (unibyte-display . iso-8859-2) 511 (unibyte-display . iso-8859-2)
367 (tutorial . "TUTORIAL.pl") 512 (tutorial . "TUTORIAL.pl")
368 (sample-text . "P,Bs(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy") 513 (sample-text . "P,Bs(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy")
369 (documentation . t)) 514 (documentation . t))
370 '("European")) 515 '("European"))
371 516
372 (set-language-info-alist 517 (set-language-info-alist
373 "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based 518 "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based
374 (coding-priority utf-8 latin-8) 519 (coding-priority utf-8 latin-8)
375 (nonascii-translation . latin-iso8859-14) 520 (nonascii-translation . iso-8859-14)
376 (input-method . "welsh") 521 (input-method . "welsh")
377 (documentation . "Support for Welsh, using Unicode.")) 522 (documentation . "Support for Welsh, using Unicode."))
378 '("European")) 523 '("European"))
379 524
380 (set-language-info-alist 525 (set-language-info-alist
387 '("European")) 532 '("European"))
388 533
389 (set-language-info-alist 534 (set-language-info-alist
390 "Latin-7" `((coding-system latin-7) 535 "Latin-7" `((coding-system latin-7)
391 (coding-priority latin-7) 536 (coding-priority latin-7)
392 (nonascii-translation . ,(get 'decode-iso-latin-7 537 (nonascii-translation . iso-8859-13)
393 'translation-table))
394 (input-method . "latin-prefix") 538 (input-method . "latin-prefix")
395 (features code-pages)
396 (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian.")) 539 (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian."))
397 '("European")) 540 '("European"))
398 541
399 (set-language-info-alist 542 (set-language-info-alist
400 "Lithuanian" `((coding-system latin-7) 543 "Lithuanian" `((coding-system latin-7 windows-1257)
401 (coding-priority latin-7) 544 (coding-priority latin-7)
545 (nonascii-translation . iso-8859-13)
402 (input-method . "lithuanian-keyboard") 546 (input-method . "lithuanian-keyboard")
403 (nonascii-translation . ,(get 'decode-iso-latin-7
404 'translation-table))
405 (features code-pages)
406 (documentation . "Support for Lithuanian.")) 547 (documentation . "Support for Lithuanian."))
407 '("European")) 548 '("European"))
408 549
409 (set-language-info-alist 550 (set-language-info-alist
410 "Latvian" `((coding-system latin-7) 551 "Latvian" `((coding-system latin-7 windows-1257)
411 (coding-priority latin-7) 552 (coding-priority latin-7)
553 (nonascii-translation . iso-8859-13)
412 (input-method . "latvian-keyboard") 554 (input-method . "latvian-keyboard")
413 (nonascii-translation . ,(get 'decode-iso-latin-7
414 'translation-table))
415 (features code-pages)
416 (documentation . "Support for Latvian.")) 555 (documentation . "Support for Latvian."))
417 '("European")) 556 '("European"))
418 557
419 (set-language-info-alist 558 (set-language-info-alist
420 "Swedish" '((tutorial . "TUTORIAL.sv") 559 "Swedish" '((tutorial . "TUTORIAL.sv")
421 (charset ascii latin-iso8859-1) 560 (charset iso-8859-1)
422 (coding-system iso-latin-1) 561 (coding-system iso-latin-1)
423 (coding-priority iso-latin-1) 562 (coding-priority iso-latin-1)
424 (nonascii-translation . latin-iso8859-1) 563 (nonascii-translation . iso-8859-1)
425 (unibyte-syntax . "latin-1")
426 (unibyte-display . iso-latin-1) 564 (unibyte-display . iso-latin-1)
427 (sample-text . "Goddag Hej") 565 (sample-text . "Goddag Hej")
428 (documentation . "Support for Swedish")) 566 (documentation . "Support for Swedish"))
429 '("European")) 567 '("European"))
430 568
431 (set-language-info-alist 569 (set-language-info-alist
432 "Croatian" '((charset . (ascii latin-iso8859-2)) 570 "Croatian" '((charset iso-8859-2)
433 (coding-system . (iso-8859-2)) 571 (coding-system iso-8859-2)
434 (coding-priority . (iso-8859-2)) 572 (coding-priority iso-8859-2)
435 (input-method . "croatian") 573 (input-method . "croatian")
436 (nonascii-translation . latin-iso8859-2) 574 (nonascii-translation . iso-8859-2)
437 (unibyte-syntax . "latin-2")
438 (unibyte-display . iso-8859-2) 575 (unibyte-display . iso-8859-2)
439 (documentation . "Support for Croatian with Latin-2 encoding.")) 576 (documentation . "Support for Croatian with Latin-2 encoding."))
440 '("European")) 577 '("European"))
441 578
442 ;; Definitions for the Mac Roman character sets and coding system. 579
443 ;; The Mac Roman encoding uses all 128 code points in the range 128 to 580 (define-coding-system 'mac-roman
444 ;; 255 for actual characters. Emacs decodes them to one of the 581 "Mac Roman Encoding (MIME:MACINTOSH)."
445 ;; following character sets. 582 :coding-type 'charset
446 ;; ascii, latin-iso8859-1, mule-unicode-0100-24ff, 583 :mnemonic ?M
447 ;; mule-unicode-2500-33ff, mule-unicode-e000-ffff 584 :charset-list '(mac-roman)
448 585 :mime-charset 'macintosh)
449 (let 586
450 ((encoding-vector (make-vector 256 nil)) 587 (define-coding-system 'next
451 (i 0) 588 "NeXTstep encoding"
452 (vec ;; mac-roman (128..255) -> UCS mapping 589 :coding-type 'charset
453 [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS 590 :mnemonic ?*
454 #x00C5 ;; 129:LATIN CAPITAL LETTER A WITH RING ABOVE 591 :charset-list '(next)
455 #x00C7 ;; 130:LATIN CAPITAL LETTER C WITH CEDILLA 592 :mime-charset 'next)
456 #x00C9 ;; 131:LATIN CAPITAL LETTER E WITH ACUTE 593
457 #x00D1 ;; 132:LATIN CAPITAL LETTER N WITH TILDE 594 (define-coding-system 'hp-roman8
458 #x00D6 ;; 133:LATIN CAPITAL LETTER O WITH DIAERESIS 595 "Hewlet-Packard roman-8 encoding (MIME:ROMAN-8)"
459 #x00DC ;; 134:LATIN CAPITAL LETTER U WITH DIAERESIS 596 :coding-type 'charset
460 #x00E1 ;; 135:LATIN SMALL LETTER A WITH ACUTE 597 :mnemonic ?*
461 #x00E0 ;; 136:LATIN SMALL LETTER A WITH GRAVE 598 :charset-list '(hp-roman8)
462 #x00E2 ;; 137:LATIN SMALL LETTER A WITH CIRCUMFLEX 599 :mime-charset 'hp-roman8)
463 #x00E4 ;; 138:LATIN SMALL LETTER A WITH DIAERESIS 600 (define-coding-system-alias 'roman8 'hp-roman8)
464 #x00E3 ;; 139:LATIN SMALL LETTER A WITH TILDE 601
465 #x00E5 ;; 140:LATIN SMALL LETTER A WITH RING ABOVE 602 (define-coding-system 'adobe-standard-encoding
466 #x00E7 ;; 141:LATIN SMALL LETTER C WITH CEDILLA 603 "Adobe `standard' encoding for PostScript"
467 #x00E9 ;; 142:LATIN SMALL LETTER E WITH ACUTE 604 :coding-type 'charset
468 #x00E8 ;; 143:LATIN SMALL LETTER E WITH GRAVE 605 :mnemonic ?*
469 #x00EA ;; 144:LATIN SMALL LETTER E WITH CIRCUMFLEX 606 :charset-list '(adobe-standard-encoding)
470 #x00EB ;; 145:LATIN SMALL LETTER E WITH DIAERESIS 607 :mime-charset 'adobe-standard-encoding)
471 #x00ED ;; 146:LATIN SMALL LETTER I WITH ACUTE 608
472 #x00EC ;; 147:LATIN SMALL LETTER I WITH GRAVE 609
473 #x00EE ;; 148:LATIN SMALL LETTER I WITH CIRCUMFLEX 610 ;; For automatic composing of diacritics and combining marks.
474 #x00EF ;; 149:LATIN SMALL LETTER I WITH DIAERESIS 611 (dolist (range '( ;; combining diacritical marks
475 #x00F1 ;; 150:LATIN SMALL LETTER N WITH TILDE 612 (#x0300 #x0314 (tc . bc))
476 #x00F3 ;; 151:LATIN SMALL LETTER O WITH ACUTE 613 (#x0315 (tr . bl))
477 #x00F2 ;; 152:LATIN SMALL LETTER O WITH GRAVE 614 (#x0316 #x0319 (bc . tc))
478 #x00F4 ;; 153:LATIN SMALL LETTER O WITH CIRCUMFLEX 615 (#x031A (tr . cl))
479 #x00F6 ;; 154:LATIN SMALL LETTER O WITH DIAERESIS 616 (#x031B #x0320 (bc . tc))
480 #x00F5 ;; 155:LATIN SMALL LETTER O WITH TILDE 617 (#x0321 (Br . tr))
481 #x00FA ;; 156:LATIN SMALL LETTER U WITH ACUTE 618 (#x0322 (Br . tl))
482 #x00F9 ;; 157:LATIN SMALL LETTER U WITH GRAVE 619 (#x0323 #x0333 (bc . tc))
483 #x00FB ;; 158:LATIN SMALL LETTER U WITH CIRCUMFLEX 620 (#x0334 #x0338 (Bc . Bc))
484 #x00FC ;; 159:LATIN SMALL LETTER U WITH DIAERESIS 621 (#x0339 #x033C (bc . tc))
485 #x2020 ;; 160:DAGGER 622 (#x033D #x033F (tc . bc))
486 #x00B0 ;; 161:DEGREE SIGN 623 (#x0340 (tl . bc))
487 #x00A2 ;; 162:CENT SIGN 624 (#x0341 (tr . bc))
488 #x00A3 ;; 163:POUND SIGN 625 (#x0342 #x0344 (tc . bc))
489 #x00A7 ;; 164:SECTION SIGN 626 (#x0345 (bc . tc))
490 #x2022 ;; 165:BULLET 627 (#x0346 (tc . bc))
491 #x00B6 ;; 166:PILCROW SIGN 628 (#x0347 #x0349 (bc . tc))
492 #x00DF ;; 167:LATIN SMALL LETTER SHARP S 629 (#x034A #x034C (tc . bc))
493 #x00AE ;; 168:REGISTERED SIGN 630 (#x034D #x034E (bc . tc))
494 #x00A9 ;; 169:COPYRIGHT SIGN 631 ;; combining diacritical marks for symbols
495 #x2122 ;; 170:TRADE MARK SIGN 632 (#x20D0 #x20D1 (tc . bc))
496 #x00B4 ;; 171:ACUTE ACCENT 633 (#x20D2 #x20D3 (Bc . Bc))
497 #x00A8 ;; 172:DIAERESIS 634 (#x20D4 #x20D7 (tc . bc))
498 #x2260 ;; 173:NOT EQUAL TO 635 (#x20D8 #x20DA (Bc . Bc))
499 #x00C6 ;; 174:LATIN CAPITAL LETTER AE 636 (#x20DB #x20DC (tc . bc))
500 #x00D8 ;; 175:LATIN CAPITAL LETTER O WITH STROKE 637 (#x20DD #x20E0 (Bc . Bc))
501 #x221E ;; 176:INFINITY 638 (#x20E1 (tc . bc))
502 #x00B1 ;; 177:PLUS-MINUS SIGN 639 (#x20E2 #x20E3 (Bc . Bc))))
503 #x2264 ;; 178:LESS-THAN OR EQUAL TO 640 (let* ((from (car range))
504 #x2265 ;; 179:GREATER-THAN OR EQUAL TO 641 (to (if (= (length range) 3)
505 #x00A5 ;; 180:YEN SIGN 642 (nth 1 range)
506 #x00B5 ;; 181:MICRO SIGN 643 from))
507 #x2202 ;; 182:PARTIAL DIFFERENTIAL 644 (composition (car (last range))))
508 #x2211 ;; 183:N-ARY SUMMATION 645 (while (<= from to)
509 #x220F ;; 184:N-ARY PRODUCT 646 (put-char-code-property from 'diacritic-composition composition)
510 #x03C0 ;; 185:GREEK SMALL LETTER PI 647 (aset composition-function-table from 'diacritic-composition-function)
511 #x222B ;; 186:INTEGRAL 648 (setq from (1+ from)))))
512 #x00AA ;; 187:FEMININE ORDINAL INDICATOR
513 #x00BA ;; 188:MASCULINE ORDINAL INDICATOR
514 #x03A9 ;; 189:GREEK CAPITAL LETTER OMEGA
515 #x00E6 ;; 190:LATIN SMALL LETTER AE
516 #x00F8 ;; 191:LATIN SMALL LETTER O WITH STROKE
517 #x00BF ;; 192:INVERTED QUESTION MARK
518 #x00A1 ;; 193:INVERTED EXCLAMATION MARK
519 #x00AC ;; 194:NOT SIGN
520 #x221A ;; 195:SQUARE ROOT
521 #x0192 ;; 196:LATIN SMALL LETTER F WITH HOOK
522 #x2248 ;; 197:ALMOST EQUAL TO
523 #x2206 ;; 198:INCREMENT
524 #x00AB ;; 199:LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
525 #x00BB ;; 200:RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
526 #x2026 ;; 201:HORIZONTAL ELLIPSIS
527 #x00A0 ;; 202:NO-BREAK SPACE
528 #x00C0 ;; 203:LATIN CAPITAL LETTER A WITH GRAVE
529 #x00C3 ;; 204:LATIN CAPITAL LETTER A WITH TILDE
530 #x00D5 ;; 205:LATIN CAPITAL LETTER O WITH TILDE
531 #x0152 ;; 206:LATIN CAPITAL LIGATURE OE
532 #x0153 ;; 207:LATIN SMALL LIGATURE OE
533 #x2013 ;; 208:EN DASH
534 #x2014 ;; 209:EM DASH
535 #x201C ;; 210:LEFT DOUBLE QUOTATION MARK
536 #x201D ;; 211:RIGHT DOUBLE QUOTATION MARK
537 #x2018 ;; 212:LEFT SINGLE QUOTATION MARK
538 #x2019 ;; 213:RIGHT SINGLE QUOTATION MARK
539 #x00F7 ;; 214:DIVISION SIGN
540 #x25CA ;; 215:LOZENGE
541 #x00FF ;; 216:LATIN SMALL LETTER Y WITH DIAERESIS
542 #x0178 ;; 217:LATIN CAPITAL LETTER Y WITH DIAERESIS
543 #x2044 ;; 218:FRACTION SLASH
544 #x20AC ;; 219:EURO SIGN
545 #x2039 ;; 220:SINGLE LEFT-POINTING ANGLE QUOTATION MARK
546 #x203A ;; 221:SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
547 #xFB01 ;; 222:LATIN SMALL LIGATURE FI
548 #xFB02 ;; 223:LATIN SMALL LIGATURE FL
549 #x2021 ;; 224:DOUBLE DAGGER
550 #x00B7 ;; 225:MIDDLE DOT
551 #x201A ;; 226:SINGLE LOW-9 QUOTATION MARK
552 #x201E ;; 227:DOUBLE LOW-9 QUOTATION MARK
553 #x2030 ;; 228:PER MILLE SIGN
554 #x00C2 ;; 229:LATIN CAPITAL LETTER A WITH CIRCUMFLEX
555 #x00CA ;; 230:LATIN CAPITAL LETTER E WITH CIRCUMFLEX
556 #x00C1 ;; 231:LATIN CAPITAL LETTER A WITH ACUTE
557 #x00CB ;; 232:LATIN CAPITAL LETTER E WITH DIAERESIS
558 #x00C8 ;; 233:LATIN CAPITAL LETTER E WITH GRAVE
559 #x00CD ;; 234:LATIN CAPITAL LETTER I WITH ACUTE
560 #x00CE ;; 235:LATIN CAPITAL LETTER I WITH CIRCUMFLEX
561 #x00CF ;; 236:LATIN CAPITAL LETTER I WITH DIAERESIS
562 #x00CC ;; 237:LATIN CAPITAL LETTER I WITH GRAVE
563 #x00D3 ;; 238:LATIN CAPITAL LETTER O WITH ACUTE
564 #x00D4 ;; 239:LATIN CAPITAL LETTER O WITH CIRCUMFLEX
565 #xF8FF ;; 240:Apple logo
566 #x00D2 ;; 241:LATIN CAPITAL LETTER O WITH GRAVE
567 #x00DA ;; 242:LATIN CAPITAL LETTER U WITH ACUTE
568 #x00DB ;; 243:LATIN CAPITAL LETTER U WITH CIRCUMFLEX
569 #x00D9 ;; 244:LATIN CAPITAL LETTER U WITH GRAVE
570 #x0131 ;; 245:LATIN SMALL LETTER DOTLESS I
571 #x02C6 ;; 246:MODIFIER LETTER CIRCUMFLEX ACCENT
572 #x02DC ;; 247:SMALL TILDE
573 #x00AF ;; 248:MACRON
574 #x02D8 ;; 249:BREVE
575 #x02D9 ;; 250:DOT ABOVE
576 #x02DA ;; 251:RING ABOVE
577 #x00B8 ;; 252:CEDILLA
578 #x02DD ;; 253:DOUBLE ACUTE ACCENT
579 #x02DB ;; 254:OGONEK
580 #x02C7 ;; 255:CARON
581 ])
582 translation-table)
583 (while (< i 128)
584 (aset encoding-vector i i)
585 (setq i (1+ i)))
586 (while (< i 256)
587 (aset encoding-vector i
588 (decode-char 'ucs (aref vec (- i 128))))
589 (setq i (1+ i)))
590 (setq translation-table
591 (make-translation-table-from-vector encoding-vector))
592 (define-translation-table 'mac-roman-decoder translation-table)
593 (define-translation-table 'mac-roman-encoder
594 (char-table-extra-slot translation-table 0)))
595
596 (define-ccl-program decode-mac-roman
597 `(4
598 ((loop
599 (read r1)
600 (if (r1 < 128) ;; ASCII
601 (r0 = ,(charset-id 'ascii))
602 (if (r1 < 160)
603 (r0 = ,(charset-id 'eight-bit-control))
604 (r0 = ,(charset-id 'eight-bit-graphic))))
605 (translate-character mac-roman-decoder r0 r1)
606 (write-multibyte-character r0 r1)
607 (repeat))))
608 "CCL program to decode Mac Roman")
609
610 (define-ccl-program encode-mac-roman
611 `(1
612 ((loop
613 (read-multibyte-character r0 r1)
614 (translate-character ucs-mule-to-mule-unicode r0 r1)
615 (translate-character mac-roman-encoder r0 r1)
616 (if (r0 != ,(charset-id 'ascii))
617 (if (r0 != ,(charset-id 'eight-bit-graphic))
618 (if (r0 != ,(charset-id 'eight-bit-control))
619 (r1 = ??))))
620 (write-repeat r1))))
621 "CCL program to encode Mac Roman")
622
623 (make-coding-system
624 'mac-roman 4 ?M
625 "Mac Roman Encoding (MIME:MACINTOSH)."
626 '(decode-mac-roman . encode-mac-roman)
627 (list (cons 'safe-chars (get 'mac-roman-encoder 'translation-table))
628 '(valid-codes (0 . 255))
629 '(mime-charset . macintosh))) ; per IANA, rfc1345
630 649
631 (defconst diacritic-composition-pattern "\\C^\\c^+") 650 (defconst diacritic-composition-pattern "\\C^\\c^+")
632 651
633 (defun diacritic-compose-region (beg end) 652 (defun diacritic-compose-region (beg end)
634 "Compose diacritic characters in the region. 653 "Compose diacritic characters in the region.
656 675
657 (defun diacritic-post-read-conversion (len) 676 (defun diacritic-post-read-conversion (len)
658 (diacritic-compose-region (point) (+ (point) len)) 677 (diacritic-compose-region (point) (+ (point) len))
659 len) 678 len)
660 679
661 (defun diacritic-composition-function (from to pattern &optional string) 680 (defun diacritic-composition-function (pos &optional string)
662 "Compose diacritic text in the region FROM and TO. 681 "Compose diacritic text around POS.
663 The text matches the regular expression PATTERN. 682 Optional 2nd argument STRING, if non-nil, is a string containing text
664 Optional 4th argument STRING, if non-nil, is a string containing text
665 to compose. 683 to compose.
666 684
667 The return value is the number of composed characters." 685 The return value is the end position of composed characters,
668 (when (< (1+ from) to) 686 or nil if no characters are composed."
669 (if string 687 (setq pos (1- pos))
670 (compose-string string from to) 688 (if string
671 (compose-region from to)) 689 (let ((ch (aref string pos))
672 (- to from))) 690 start end components ch composition)
673 691 (when (and (>= pos 0)
674 ;; Register a function to compose Unicode diacrtics and marks. 692 ;; Previous character is latin.
675 (let ((patterns '(("\\C^\\c^+" . diacritic-composition-function)))) 693 (aref (char-category-set ch) ?l)
676 (let ((c #x300)) 694 (/= ch 32))
677 (while (<= c #x362) 695 (setq start pos
678 (aset composition-function-table (decode-char 'ucs c) patterns) 696 end (length string)
679 (setq c (1+ c))) 697 components (list ch)
680 (setq c #x20d0) 698 pos (1+ pos))
681 (while (<= c #x20e3) 699 (while (and
682 (aset composition-function-table (decode-char 'ucs c) patterns) 700 (< pos end)
683 (setq c (1+ c))))) 701 (setq ch (aref string pos)
702 composition
703 (get-char-code-property ch 'diacritic-composition)))
704 (setq components (cons ch (cons composition components))
705 pos (1+ pos)))
706 (compose-string string start pos (nreverse components))
707 pos))
708 (let ((ch (char-after pos))
709 start end components composition)
710 (when (and (>= pos (point-min))
711 (aref (char-category-set ch) ?l)
712 (/= ch 32))
713 (setq start pos
714 end (point-max)
715 components (list ch)
716 pos (1+ pos))
717 (while (and
718 (< pos end)
719 (setq ch (char-after pos)
720 composition
721 (get-char-code-property ch 'diacritic-composition)))
722 (setq components (cons ch (cons composition components))
723 pos (1+ pos)))
724 (compose-region start pos (nreverse components))
725 pos))))
684 726
685 (provide 'european) 727 (provide 'european)
686 728
687 ;;; european.el ends here 729 ;;; european.el ends here