comparison lisp/language/european.el @ 88414:fad0f879877f

Call define-coding-system instead of make-coding-system. All CCL program deleted.
author Kenichi Handa <handa@m17n.org>
date Fri, 01 Mar 2002 02:28:29 +0000
parents 06cba78a5cdd
children 3ef048e3d781
comparison
equal deleted inserted replaced
88413:418777d5ccd4 88414:fad0f879877f
30 30
31 ;;; Code: 31 ;;; Code:
32 32
33 ;; Latin-1 (ISO-8859-1) 33 ;; Latin-1 (ISO-8859-1)
34 34
35 (make-coding-system 35 (set-language-info-alist
36 'iso-latin-1 2 ?1 36 "Latin-1" '((charset iso-8859-1)
37 "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)."
38 '(ascii latin-iso8859-1 nil nil
39 nil nil nil nil nil nil nil nil nil nil nil nil t)
40 '((safe-charsets ascii latin-iso8859-1)
41 (mime-charset . iso-8859-1)))
42
43 (define-coding-system-alias 'iso-8859-1 'iso-latin-1)
44 (define-coding-system-alias 'latin-1 'iso-latin-1)
45
46 (set-language-info-alist
47 "Latin-1" '((charset ascii latin-iso8859-1)
48 (coding-system iso-latin-1) 37 (coding-system iso-latin-1)
49 (coding-priority iso-latin-1) 38 (coding-priority iso-latin-1)
50 (nonascii-translation . latin-iso8859-1) 39 (nonascii-translation . iso-8859-1)
51 (unibyte-syntax . "latin-1") 40 (unibyte-syntax . "latin-1")
52 (unibyte-display . iso-latin-1) 41 (unibyte-display . iso-latin-1)
53 (input-method . "latin-1-prefix") 42 (input-method . "latin-1-prefix")
54 (sample-text 43 (sample-text
55 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") 44 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
72 '("European")) 61 '("European"))
73 62
74 63
75 ;; Latin-2 (ISO-8859-2) 64 ;; Latin-2 (ISO-8859-2)
76 65
77 (make-coding-system 66 (define-coding-system 'iso-latin-2
78 'iso-latin-2 2 ?2 67 "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."
79 "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)." 68 :coding-type 'charset
80 '(ascii latin-iso8859-2 nil nil 69 :mnemonic ?2
81 nil nil nil nil nil nil nil) 70 :charset-list '(iso-8859-2)
82 '((safe-charsets ascii latin-iso8859-2) 71 :plist '(mime-charset iso-8859-2))
83 (mime-charset . iso-8859-2)))
84 72
85 (define-coding-system-alias 'iso-8859-2 'iso-latin-2) 73 (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
86 (define-coding-system-alias 'latin-2 'iso-latin-2) 74 (define-coding-system-alias 'latin-2 'iso-latin-2)
87 75
88 (set-language-info-alist 76 (set-language-info-alist
89 "Latin-2" '((charset ascii latin-iso8859-2) 77 "Latin-2" '((charset iso-8859-2)
90 (coding-system iso-latin-2) 78 (coding-system iso-latin-2)
91 (coding-priority iso-latin-2) 79 (coding-priority iso-latin-2)
92 (nonascii-translation . latin-iso8859-2) 80 (nonascii-translation . iso-8859-2)
93 (unibyte-syntax . "latin-2") 81 (unibyte-syntax . "latin-2")
94 (unibyte-display . iso-latin-2) 82 (unibyte-display . iso-latin-2)
95 (input-method . "latin-2-prefix") 83 (input-method . "latin-2-prefix")
96 (documentation . "\ 84 (documentation . "\
97 This language environment is a generic one for the Latin-2 (ISO-8859-2) 85 This language environment is a generic one for the Latin-2 (ISO-8859-2)
106 '("European")) 94 '("European"))
107 95
108 96
109 ;; Latin-3 (ISO-8859-3) 97 ;; Latin-3 (ISO-8859-3)
110 98
111 (make-coding-system 99 (define-coding-system 'iso-latin-3
112 'iso-latin-3 2 ?3 100 "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."
113 "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)." 101 :coding-type 'charset
114 '(ascii latin-iso8859-3 nil nil 102 :mnemonic ?3
115 nil nil nil nil nil nil nil) 103 :charset-list '(iso-8859-3)
116 '((safe-charsets ascii latin-iso8859-3) 104 :plist '(mime-charset iso-8859-3))
117 (mime-charset . iso-8859-3)))
118 105
119 (define-coding-system-alias 'iso-8859-3 'iso-latin-3) 106 (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
120 (define-coding-system-alias 'latin-3 'iso-latin-3) 107 (define-coding-system-alias 'latin-3 'iso-latin-3)
121 108
122 (set-language-info-alist 109 (set-language-info-alist
123 "Latin-3" '((charset ascii latin-iso8859-3) 110 "Latin-3" '((charset iso-8859-3)
124 (coding-system iso-latin-3) 111 (coding-system iso-latin-3)
125 (coding-priority iso-latin-3) 112 (coding-priority iso-latin-3)
126 (nonascii-translation . latin-iso8859-3) 113 (nonascii-translation . iso-8859-3)
127 (unibyte-syntax . "latin-3") 114 (unibyte-syntax . "latin-3")
128 (unibyte-display . iso-latin-3) 115 (unibyte-display . iso-latin-3)
129 (input-method . "latin-3-prefix") 116 (input-method . "latin-3-prefix")
130 (documentation . "\ 117 (documentation . "\
131 These languages are supported with the Latin-3 (ISO-8859-3) character set: 118 These languages are supported with the Latin-3 (ISO-8859-3) character set:
134 '("European")) 121 '("European"))
135 122
136 123
137 ;; Latin-4 (ISO-8859-4) 124 ;; Latin-4 (ISO-8859-4)
138 125
139 (make-coding-system 126 (define-coding-system 'iso-latin-4
140 'iso-latin-4 2 ?4 127 "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."
141 "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)." 128 :coding-type 'charset
142 '(ascii latin-iso8859-4 nil nil 129 :mnemonic ?4
143 nil nil nil nil nil nil nil) 130 :charset-list '(iso-8859-4)
144 '((safe-charsets ascii latin-iso8859-4) 131 :plist '(mime-charset iso-8859-4))
145 (mime-charset . iso-8859-4)))
146 132
147 (define-coding-system-alias 'iso-8859-4 'iso-latin-4) 133 (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
148 (define-coding-system-alias 'latin-4 'iso-latin-4) 134 (define-coding-system-alias 'latin-4 'iso-latin-4)
149 135
150 (set-language-info-alist 136 (set-language-info-alist
151 "Latin-4" '((charset ascii latin-iso8859-4) 137 "Latin-4" '((charset iso-8859-4)
152 (coding-system iso-8859-4) 138 (coding-system iso-8859-4)
153 (coding-priority iso-8859-4) 139 (coding-priority iso-8859-4)
154 (nonascii-translation . latin-iso8859-4) 140 (nonascii-translation . iso-8859-4)
155 (unibyte-syntax . "latin-4") 141 (unibyte-syntax . "latin-4")
156 (unibyte-display . iso-8859-4) 142 (unibyte-display . iso-8859-4)
157 (input-method . "latin-4-postfix") 143 (input-method . "latin-4-postfix")
158 (documentation . "\ 144 (documentation . "\
159 These languages are supported with the Latin-4 (ISO-8859-4) character set: 145 These languages are supported with the Latin-4 (ISO-8859-4) character set:
162 '("European")) 148 '("European"))
163 149
164 150
165 ;; Latin-5 (ISO-8859-9) 151 ;; Latin-5 (ISO-8859-9)
166 152
167 (make-coding-system 153 (define-coding-system 'iso-latin-5
168 'iso-latin-5 2 ?9 154 "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."
169 "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)." 155 :coding-type 'charset
170 '(ascii latin-iso8859-9 nil nil 156 :mnemonic ?9
171 nil nil nil nil nil nil nil) 157 :charset-list '(iso-8859-9)
172 '((safe-charsets ascii latin-iso8859-9) 158 :plist '(mime-charset iso-8859-9))
173 (mime-charset . iso-8859-9)))
174 159
175 (define-coding-system-alias 'iso-8859-9 'iso-latin-5) 160 (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
176 (define-coding-system-alias 'latin-5 'iso-latin-5) 161 (define-coding-system-alias 'latin-5 'iso-latin-5)
177 162
178 (set-language-info-alist 163 (set-language-info-alist
179 "Latin-5" '((charset ascii latin-iso8859-9) 164 "Latin-5" '((charset iso-8859-9)
180 (coding-system iso-latin-5) 165 (coding-system iso-latin-5)
181 (coding-priority iso-latin-5) 166 (coding-priority iso-latin-5)
182 (nonascii-translation . latin-iso8859-9) 167 (nonascii-translation . iso-8859-9)
183 (unibyte-syntax . "latin-5") 168 (unibyte-syntax . "latin-5")
184 (unibyte-display . iso-latin-5) 169 (unibyte-display . iso-latin-5)
185 (input-method . "latin-5-postfix") 170 (input-method . "latin-5-postfix")
186 (documentation . "Support for Turkish language.")) 171 (documentation . "Support for Turkish language."))
187 '("European")) 172 '("European"))
188 173
189 174
190 ;; Latin-8 (ISO-8859-14) 175 ;; Latin-8 (ISO-8859-14)
191 176
192 (make-coding-system 177 (define-coding-system 'iso-latin-8
193 'iso-latin-8 2 ?W ; `W' for `Welsh', since `C' 178 "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."
194 ; for `Celtic' is taken. 179 :coding-type 'charset
195 "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)." 180 ;; `W' for `Welsh', since `C' for `Celtic' is taken.
196 '(ascii latin-iso8859-14 nil nil 181 :mnemonic ?W
197 nil nil nil nil nil nil nil nil nil nil nil nil t) 182 :charset-list '(iso-8859-14)
198 '((safe-charsets ascii latin-iso8859-14) 183 :plist '(mime-charset iso-8859-14))
199 (mime-charset . iso-8859-14)))
200 184
201 (define-coding-system-alias 'iso-8859-14 'iso-latin-8) 185 (define-coding-system-alias 'iso-8859-14 'iso-latin-8)
202 (define-coding-system-alias 'latin-8 'iso-latin-8) 186 (define-coding-system-alias 'latin-8 'iso-latin-8)
203 187
204 (set-language-info-alist 188 (set-language-info-alist
205 "Latin-8" '((charset ascii latin-iso8859-14) 189 "Latin-8" '((charset iso-8859-14)
206 (coding-system iso-latin-8) 190 (coding-system iso-latin-8)
207 (coding-priority iso-latin-8) 191 (coding-priority iso-latin-8)
208 (nonascii-translation . latin-iso8859-14) 192 (nonascii-translation . iso-8859-14)
209 (unibyte-syntax . "latin-8") 193 (unibyte-syntax . "latin-8")
210 (unibyte-display . iso-latin-8) 194 (unibyte-display . iso-latin-8)
211 (input-method . "latin-8-prefix") 195 (input-method . "latin-8-prefix")
212 ;; Fixme: Welsh/Ga{e}lic greetings 196 ;; Fixme: Welsh/Ga{e}lic greetings
213 (sample-text . ",_"(B ,_p(B ,_^(B") 197 (sample-text . ",_"(B ,_p(B ,_^(B")
218 Welsh, Manx Gaelic and Irish Gaelic (old orthography).")) 202 Welsh, Manx Gaelic and Irish Gaelic (old orthography)."))
219 '("European")) 203 '("European"))
220 204
221 ;; Latin-9 (ISO-8859-15) 205 ;; Latin-9 (ISO-8859-15)
222 206
223 (make-coding-system 207 (define-coding-system 'iso-latin-9
224 'iso-latin-9 2 ?0 ; `0' for `Latin-0' 208 "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."
225 "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)." 209 :coding-type 'charset
226 '(ascii latin-iso8859-15 nil nil 210 ;; `0' for `Latin-0'
227 nil nil nil nil nil nil nil nil nil nil nil nil t) 211 :mnemonic ?0
228 '((safe-charsets ascii latin-iso8859-15) 212 :charset-list '(iso-8859-15)
229 (mime-charset . iso-8859-15))) 213 :plist '(mime-charset iso-8859-15))
230 214
231 (define-coding-system-alias 'iso-8859-15 'iso-latin-9) 215 (define-coding-system-alias 'iso-8859-15 'iso-latin-9)
232 (define-coding-system-alias 'latin-9 'iso-latin-9) 216 (define-coding-system-alias 'latin-9 'iso-latin-9)
233 (define-coding-system-alias 'latin-0 'iso-latin-9) 217 (define-coding-system-alias 'latin-0 'iso-latin-9)
234 218
235 (set-language-info-alist 219 (set-language-info-alist
236 "Latin-9" '((charset ascii latin-iso8859-15) 220 "Latin-9" '((charset iso-8859-15)
237 (coding-system iso-latin-9) 221 (coding-system iso-latin-9)
238 (coding-priority iso-latin-9) 222 (coding-priority iso-latin-9)
239 (nonascii-translation . latin-iso8859-15) 223 (nonascii-translation . iso-8859-15)
240 (unibyte-syntax . "latin-9") 224 (unibyte-syntax . "latin-9")
241 (unibyte-display . iso-latin-9) 225 (unibyte-display . iso-latin-9)
242 (input-method . "latin-9-prefix") 226 (input-method . "latin-9-prefix")
243 (sample-text 227 (sample-text
244 . "AVE. ,b&(48<=>(B ,b$(B") 228 . "AVE. ,b&(48<=>(B ,b$(B")
249 Latin-9 is sometimes nicknamed `Latin-0'.")) 233 Latin-9 is sometimes nicknamed `Latin-0'."))
250 '("European")) 234 '("European"))
251 235
252 (set-language-info-alist 236 (set-language-info-alist
253 "German" '((tutorial . "TUTORIAL.de") 237 "German" '((tutorial . "TUTORIAL.de")
254 (charset ascii latin-iso8859-1) 238 (charset iso-8859-1)
255 (coding-system iso-latin-1) 239 (coding-system iso-latin-1)
256 (coding-priority iso-latin-1) 240 (coding-priority iso-latin-1)
241 (nonascii-translation . iso-8859-1)
257 (input-method . "german-postfix") 242 (input-method . "german-postfix")
258 (nonascii-translation . iso-latin-1)
259 (unibyte-syntax . "latin-1") 243 (unibyte-syntax . "latin-1")
260 (unibyte-display . iso-latin-1) 244 (unibyte-display . iso-latin-1)
261 (sample-text . "\ 245 (sample-text . "\
262 German (Deutsch Nord) Guten Tag 246 German (Deutsch Nord) Guten Tag
263 German (Deutsch S,A|(Bd) Gr,A|_(B Gott") 247 German (Deutsch S,A|(Bd) Gr,A|_(B Gott")
267 Additionally, it selects the German tutorial.")) 251 Additionally, it selects the German tutorial."))
268 '("European")) 252 '("European"))
269 253
270 (set-language-info-alist 254 (set-language-info-alist
271 "French" '((tutorial . "TUTORIAL.fr") 255 "French" '((tutorial . "TUTORIAL.fr")
272 (charset ascii latin-iso8859-1) 256 (charset iso-8859-1)
273 (coding-system iso-latin-1) 257 (coding-system iso-latin-1)
274 (coding-priority iso-latin-1) 258 (coding-priority iso-latin-1)
275 (nonascii-translation . latin-iso8859-1) 259 (nonascii-translation . iso-8859-1)
276 (unibyte-syntax . "latin-1") 260 (unibyte-syntax . "latin-1")
277 (unibyte-display . iso-latin-1) 261 (unibyte-display . iso-latin-1)
278 (input-method . "latin-1-prefix") 262 (input-method . "latin-1-prefix")
279 (sample-text . "French (Fran,Ag(Bais) Bonjour, Salut") 263 (sample-text . "French (Fran,Ag(Bais) Bonjour, Salut")
280 (documentation . "\ 264 (documentation . "\
281 This language environment is almost the same as Latin-1, 265 This language environment is almost the same as Latin-1,
282 but it selects the French tutorial.")) 266 but it selects the French tutorial."))
283 '("European")) 267 '("European"))
284 268
285 (set-language-info-alist 269 (set-language-info-alist
286 "Slovenian" '((charset . (ascii latin-iso8859-2)) 270 "Slovenian" '((charset iso-8859-2)
287 (coding-system . (iso-8859-2)) 271 (coding-system . (iso-8859-2))
288 (coding-priority . (iso-8859-2)) 272 (coding-priority . (iso-8859-2))
289 (nonascii-translation . latin-iso8859-2) 273 (nonascii-translation . iso-8859-2)
290 (input-method . "latin-2-postfix") 274 (input-method . "latin-2-postfix")
291 (unibyte-syntax . "latin-2") 275 (unibyte-syntax . "latin-2")
292 (unibyte-display . iso-8859-2) 276 (unibyte-display . iso-8859-2)
293 (tutorial . "TUTORIAL.sl") 277 (tutorial . "TUTORIAL.sl")
294 (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!") 278 (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!")
295 (documentation . t)) 279 (documentation . t))
296 '("European")) 280 '("European"))
297 281
298 (set-language-info-alist 282 (set-language-info-alist
299 "Spanish" '((tutorial . "TUTORIAL.es") 283 "Spanish" '((tutorial . "TUTORIAL.es")
300 (charset ascii latin-iso8859-1) 284 (charset iso-8859-1)
301 (coding-system iso-latin-1) 285 (coding-system iso-latin-1)
302 (coding-priority iso-latin-1) 286 (coding-priority iso-latin-1)
287 (nonascii-translation . iso-8859-1)
303 (input-method . "spanish-postfix") 288 (input-method . "spanish-postfix")
304 (nonascii-translation . iso-latin-1)
305 (unibyte-syntax . "latin-1") 289 (unibyte-syntax . "latin-1")
306 (unibyte-display . iso-latin-1) 290 (unibyte-display . iso-latin-1)
307 (sample-text . "Spanish (Espa,Aq(Bol) ,A!(BHola!") 291 (sample-text . "Spanish (Espa,Aq(Bol) ,A!(BHola!")
308 (documentation . "\ 292 (documentation . "\
309 This language environment is almost the same as Latin-1, 293 This language environment is almost the same as Latin-1,
311 and it selects the Spanish tutorial.")) 295 and it selects the Spanish tutorial."))
312 '("European")) 296 '("European"))
313 297
314 (set-language-info-alist 298 (set-language-info-alist
315 "Dutch" '((tutorial . "TUTORIAL.nl") 299 "Dutch" '((tutorial . "TUTORIAL.nl")
316 (charset ascii latin-iso8859-1) 300 (charset iso-8859-1)
317 (coding-system iso-latin-1) 301 (coding-system iso-latin-1)
318 (coding-priority iso-latin-1) 302 (coding-priority iso-latin-1)
319 (nonascii-translation . iso-latin-1) 303 (nonascii-translation . iso-8859-1)
320 (unibyte-syntax . "latin-1") 304 (unibyte-syntax . "latin-1")
321 (unibyte-display . iso-latin-1) 305 (unibyte-display . iso-latin-1)
322 (sample-text . "Er is een aantal manieren waarop je dit kan doen") 306 (sample-text . "Er is een aantal manieren waarop je dit kan doen")
323 (documentation . "\ 307 (documentation . "\
324 This language environment is almost the same as Latin-1, 308 This language environment is almost the same as Latin-1,
329 ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3) 313 ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3)
330 ;; was used for Turkish. Those who use Latin-3 for Turkish should use 314 ;; was used for Turkish. Those who use Latin-3 for Turkish should use
331 ;; "Latin-3" language environment. 315 ;; "Latin-3" language environment.
332 316
333 (set-language-info-alist 317 (set-language-info-alist
334 "Turkish" '((charset ascii latin-iso8859-9) 318 "Turkish" '((charset iso-8859-9)
335 (coding-system iso-latin-5) 319 (coding-system iso-latin-5)
336 (coding-priority iso-latin-5) 320 (coding-priority iso-latin-5)
337 (nonascii-translation . latin-iso8859-9) 321 (nonascii-translation . iso-8859-9)
338 (unibyte-syntax . "latin-5") 322 (unibyte-syntax . "latin-5")
339 (unibyte-display . iso-latin-5) 323 (unibyte-display . iso-latin-5)
340 (input-method . "turkish-postfix") 324 (input-method . "turkish-postfix")
341 (sample-text . "Turkish (T,M|(Brk,Mg(Be) Merhaba") 325 (sample-text . "Turkish (T,M|(Brk,Mg(Be) Merhaba")
342 (documentation . t))) 326 (documentation . t)))
344 ;; Polish ISO 8859-2 environment. 328 ;; Polish ISO 8859-2 environment.
345 ;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl> 329 ;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl>
346 ;; Keywords: multilingual, Polish 330 ;; Keywords: multilingual, Polish
347 331
348 (set-language-info-alist 332 (set-language-info-alist
349 "Polish" '((charset . (ascii latin-iso8859-2)) 333 "Polish" '((charset . (iso-8859-2))
350 (coding-system . (iso-8859-2)) 334 (coding-system . (iso-8859-2))
351 (coding-priority . (iso-8859-2)) 335 (coding-priority . (iso-8859-2))
336 (nonascii-translation . iso-8859-2)
352 (input-method . "polish-slash") 337 (input-method . "polish-slash")
353 (nonascii-translation . latin-iso8859-2)
354 (unibyte-syntax . "latin-2") 338 (unibyte-syntax . "latin-2")
355 (unibyte-display . iso-8859-2) 339 (unibyte-display . iso-8859-2)
356 (tutorial . "TUTORIAL.pl") 340 (tutorial . "TUTORIAL.pl")
357 (sample-text . "P,Bs(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy") 341 (sample-text . "P,Bs(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy")
358 (documentation . t)) 342 (documentation . t))
359 '("European")) 343 '("European"))
360 344
361 (set-language-info-alist 345 (set-language-info-alist
362 "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based 346 "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based
363 (coding-priority utf-8 latin-8) 347 (coding-priority utf-8 latin-8)
348 (nonascii-translation . iso-8859-14)
364 (input-method . "welsh") 349 (input-method . "welsh")
365 (documentation . "Support for Welsh, using Unicode.")) 350 (documentation . "Support for Welsh, using Unicode."))
366 '("European")) 351 '("European"))
367 352
368 (set-language-info-alist 353 (set-language-info-alist
369 "Latin-7" `((coding-system latin-7) 354 "Latin-7" `((coding-system latin-7)
370 (coding-priority latin-7) 355 (coding-priority latin-7)
356 (nonascii-translation . iso-8859-13)
371 ;; Fixme: input-method 357 ;; Fixme: input-method
372 (features code-pages) 358 (features code-pages)
373 (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian.")) 359 (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian."))
374 '("European")) 360 '("European"))
375 361
376 (set-language-info-alist 362 (set-language-info-alist
377 "Lithuanian" `((coding-system latin-7) 363 "Lithuanian" `((coding-system latin-7)
378 (coding-priority latin-7) 364 (coding-priority latin-7)
365 (nonascii-translation . iso-8859-13)
379 (input-method . "lithuanian-keyboard") 366 (input-method . "lithuanian-keyboard")
380 (features code-pages) 367 (features code-pages)
381 (documentation . "Support for Lithuanian.")) 368 (documentation . "Support for Lithuanian."))
382 '("European")) 369 '("European"))
383 370
384 (set-language-info-alist 371 (set-language-info-alist
385 "Latvian" `((coding-system latin-7) 372 "Latvian" `((coding-system latin-7)
386 (coding-priority latin-7) 373 (coding-priority latin-7)
374 (nonascii-translation . iso-8859-13)
387 (input-method . "latvian-keyboard") 375 (input-method . "latvian-keyboard")
388 (features code-pages) 376 (features code-pages)
389 (documentation . "Support for Latvian.")) 377 (documentation . "Support for Latvian."))
390 '("European")) 378 '("European"))
391 379
392 ;; Definitions for the Mac Roman character sets and coding system. 380
393 ;; The Mac Roman encoding uses all 128 code points in the range 128 to 381 (define-coding-system 'mac-roman
394 ;; 255 for actual characters. Emacs decodes them to one of the 382 "Mac Roman Encoding (MIME:MACINTOSH)."
395 ;; following character sets. 383 :coding-type 'charset
396 ;; ascii, latin-iso8859-1, mule-unicode-0100-24ff, 384 :mnemonic ?M
397 ;; mule-unicode-2500-33ff, mule-unicode-e000-ffff 385 :charset-list '(mac-roman)
398 386 ;; per IANA, rfc1345
399 (let 387 :mime-charset 'macintosh)
400 ((encoding-vector (make-vector 256 nil))
401 (i 0)
402 (vec ;; mac-roman (128..255) -> UCS mapping
403 [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS
404 #x00C5 ;; 129:LATIN CAPITAL LETTER A WITH RING ABOVE
405 #x00C7 ;; 130:LATIN CAPITAL LETTER C WITH CEDILLA
406 #x00C9 ;; 131:LATIN CAPITAL LETTER E WITH ACUTE
407 #x00D1 ;; 132:LATIN CAPITAL LETTER N WITH TILDE
408 #x00D6 ;; 133:LATIN CAPITAL LETTER O WITH DIAERESIS
409 #x00DC ;; 134:LATIN CAPITAL LETTER U WITH DIAERESIS
410 #x00E1 ;; 135:LATIN SMALL LETTER A WITH ACUTE
411 #x00E0 ;; 136:LATIN SMALL LETTER A WITH GRAVE
412 #x00E2 ;; 137:LATIN SMALL LETTER A WITH CIRCUMFLEX
413 #x00E4 ;; 138:LATIN SMALL LETTER A WITH DIAERESIS
414 #x00E3 ;; 139:LATIN SMALL LETTER A WITH TILDE
415 #x00E5 ;; 140:LATIN SMALL LETTER A WITH RING ABOVE
416 #x00E7 ;; 141:LATIN SMALL LETTER C WITH CEDILLA
417 #x00E9 ;; 142:LATIN SMALL LETTER E WITH ACUTE
418 #x00E8 ;; 143:LATIN SMALL LETTER E WITH GRAVE
419 #x00EA ;; 144:LATIN SMALL LETTER E WITH CIRCUMFLEX
420 #x00EB ;; 145:LATIN SMALL LETTER E WITH DIAERESIS
421 #x00ED ;; 146:LATIN SMALL LETTER I WITH ACUTE
422 #x00EC ;; 147:LATIN SMALL LETTER I WITH GRAVE
423 #x00EE ;; 148:LATIN SMALL LETTER I WITH CIRCUMFLEX
424 #x00EF ;; 149:LATIN SMALL LETTER I WITH DIAERESIS
425 #x00F1 ;; 150:LATIN SMALL LETTER N WITH TILDE
426 #x00F3 ;; 151:LATIN SMALL LETTER O WITH ACUTE
427 #x00F2 ;; 152:LATIN SMALL LETTER O WITH GRAVE
428 #x00F4 ;; 153:LATIN SMALL LETTER O WITH CIRCUMFLEX
429 #x00F6 ;; 154:LATIN SMALL LETTER O WITH DIAERESIS
430 #x00F5 ;; 155:LATIN SMALL LETTER O WITH TILDE
431 #x00FA ;; 156:LATIN SMALL LETTER U WITH ACUTE
432 #x00F9 ;; 157:LATIN SMALL LETTER U WITH GRAVE
433 #x00FB ;; 158:LATIN SMALL LETTER U WITH CIRCUMFLEX
434 #x00FC ;; 159:LATIN SMALL LETTER U WITH DIAERESIS
435 #x2020 ;; 160:DAGGER
436 #x00B0 ;; 161:DEGREE SIGN
437 #x00A2 ;; 162:CENT SIGN
438 #x00A3 ;; 163:POUND SIGN
439 #x00A7 ;; 164:SECTION SIGN
440 #x2022 ;; 165:BULLET
441 #x00B6 ;; 166:PILCROW SIGN
442 #x00DF ;; 167:LATIN SMALL LETTER SHARP S
443 #x00AE ;; 168:REGISTERED SIGN
444 #x00A9 ;; 169:COPYRIGHT SIGN
445 #x2122 ;; 170:TRADE MARK SIGN
446 #x00B4 ;; 171:ACUTE ACCENT
447 #x00A8 ;; 172:DIAERESIS
448 #x2260 ;; 173:NOT EQUAL TO
449 #x00C6 ;; 174:LATIN CAPITAL LETTER AE
450 #x00D8 ;; 175:LATIN CAPITAL LETTER O WITH STROKE
451 #x221E ;; 176:INFINITY
452 #x00B1 ;; 177:PLUS-MINUS SIGN
453 #x2264 ;; 178:LESS-THAN OR EQUAL TO
454 #x2265 ;; 179:GREATER-THAN OR EQUAL TO
455 #x00A5 ;; 180:YEN SIGN
456 #x00B5 ;; 181:MICRO SIGN
457 #x2202 ;; 182:PARTIAL DIFFERENTIAL
458 #x2211 ;; 183:N-ARY SUMMATION
459 #x220F ;; 184:N-ARY PRODUCT
460 #x03C0 ;; 185:GREEK SMALL LETTER PI
461 #x222B ;; 186:INTEGRAL
462 #x00AA ;; 187:FEMININE ORDINAL INDICATOR
463 #x00BA ;; 188:MASCULINE ORDINAL INDICATOR
464 #x03A9 ;; 189:GREEK CAPITAL LETTER OMEGA
465 #x00E6 ;; 190:LATIN SMALL LETTER AE
466 #x00F8 ;; 191:LATIN SMALL LETTER O WITH STROKE
467 #x00BF ;; 192:INVERTED QUESTION MARK
468 #x00A1 ;; 193:INVERTED EXCLAMATION MARK
469 #x00AC ;; 194:NOT SIGN
470 #x221A ;; 195:SQUARE ROOT
471 #x0192 ;; 196:LATIN SMALL LETTER F WITH HOOK
472 #x2248 ;; 197:ALMOST EQUAL TO
473 #x2206 ;; 198:INCREMENT
474 #x00AB ;; 199:LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
475 #x00BB ;; 200:RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
476 #x2026 ;; 201:HORIZONTAL ELLIPSIS
477 #x00A0 ;; 202:NO-BREAK SPACE
478 #x00C0 ;; 203:LATIN CAPITAL LETTER A WITH GRAVE
479 #x00C3 ;; 204:LATIN CAPITAL LETTER A WITH TILDE
480 #x00D5 ;; 205:LATIN CAPITAL LETTER O WITH TILDE
481 #x0152 ;; 206:LATIN CAPITAL LIGATURE OE
482 #x0153 ;; 207:LATIN SMALL LIGATURE OE
483 #x2013 ;; 208:EN DASH
484 #x2014 ;; 209:EM DASH
485 #x201C ;; 210:LEFT DOUBLE QUOTATION MARK
486 #x201D ;; 211:RIGHT DOUBLE QUOTATION MARK
487 #x2018 ;; 212:LEFT SINGLE QUOTATION MARK
488 #x2019 ;; 213:RIGHT SINGLE QUOTATION MARK
489 #x00F7 ;; 214:DIVISION SIGN
490 #x25CA ;; 215:LOZENGE
491 #x00FF ;; 216:LATIN SMALL LETTER Y WITH DIAERESIS
492 #x0178 ;; 217:LATIN CAPITAL LETTER Y WITH DIAERESIS
493 #x2044 ;; 218:FRACTION SLASH
494 #x20AC ;; 219:EURO SIGN
495 #x2039 ;; 220:SINGLE LEFT-POINTING ANGLE QUOTATION MARK
496 #x203A ;; 221:SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
497 #xFB01 ;; 222:LATIN SMALL LIGATURE FI
498 #xFB02 ;; 223:LATIN SMALL LIGATURE FL
499 #x2021 ;; 224:DOUBLE DAGGER
500 #x00B7 ;; 225:MIDDLE DOT
501 #x201A ;; 226:SINGLE LOW-9 QUOTATION MARK
502 #x201E ;; 227:DOUBLE LOW-9 QUOTATION MARK
503 #x2030 ;; 228:PER MILLE SIGN
504 #x00C2 ;; 229:LATIN CAPITAL LETTER A WITH CIRCUMFLEX
505 #x00CA ;; 230:LATIN CAPITAL LETTER E WITH CIRCUMFLEX
506 #x00C1 ;; 231:LATIN CAPITAL LETTER A WITH ACUTE
507 #x00CB ;; 232:LATIN CAPITAL LETTER E WITH DIAERESIS
508 #x00C8 ;; 233:LATIN CAPITAL LETTER E WITH GRAVE
509 #x00CD ;; 234:LATIN CAPITAL LETTER I WITH ACUTE
510 #x00CE ;; 235:LATIN CAPITAL LETTER I WITH CIRCUMFLEX
511 #x00CF ;; 236:LATIN CAPITAL LETTER I WITH DIAERESIS
512 #x00CC ;; 237:LATIN CAPITAL LETTER I WITH GRAVE
513 #x00D3 ;; 238:LATIN CAPITAL LETTER O WITH ACUTE
514 #x00D4 ;; 239:LATIN CAPITAL LETTER O WITH CIRCUMFLEX
515 #xF8FF ;; 240:Apple logo
516 #x00D2 ;; 241:LATIN CAPITAL LETTER O WITH GRAVE
517 #x00DA ;; 242:LATIN CAPITAL LETTER U WITH ACUTE
518 #x00DB ;; 243:LATIN CAPITAL LETTER U WITH CIRCUMFLEX
519 #x00D9 ;; 244:LATIN CAPITAL LETTER U WITH GRAVE
520 #x0131 ;; 245:LATIN SMALL LETTER DOTLESS I
521 #x02C6 ;; 246:MODIFIER LETTER CIRCUMFLEX ACCENT
522 #x02DC ;; 247:SMALL TILDE
523 #x00AF ;; 248:MACRON
524 #x02D8 ;; 249:BREVE
525 #x02D9 ;; 250:DOT ABOVE
526 #x02DA ;; 251:RING ABOVE
527 #x00B8 ;; 252:CEDILLA
528 #x02DD ;; 253:DOUBLE ACUTE ACCENT
529 #x02DB ;; 254:OGONEK
530 #x02C7 ;; 255:CARON
531 ])
532 translation-table)
533 (while (< i 128)
534 (aset encoding-vector i i)
535 (setq i (1+ i)))
536 (while (< i 256)
537 (aset encoding-vector i
538 (decode-char 'ucs (aref vec (- i 128))))
539 (setq i (1+ i)))
540 (setq translation-table
541 (make-translation-table-from-vector encoding-vector))
542 (define-translation-table 'mac-roman-decoder translation-table)
543 (define-translation-table 'mac-roman-encoder
544 (char-table-extra-slot translation-table 0)))
545
546 (define-ccl-program decode-mac-roman
547 `(4
548 ((loop
549 (read r1)
550 (if (r1 < 128) ;; ASCII
551 (r0 = ,(charset-id 'ascii))
552 (if (r1 < 160)
553 (r0 = ,(charset-id 'eight-bit-control))
554 (r0 = ,(charset-id 'eight-bit-graphic))))
555 (translate-character mac-roman-decoder r0 r1)
556 (write-multibyte-character r0 r1)
557 (repeat))))
558 "CCL program to decode Mac Roman")
559
560 (define-ccl-program encode-mac-roman
561 `(1
562 ((loop
563 (read-multibyte-character r0 r1)
564 (translate-character mac-roman-encoder r0 r1)
565 (write-repeat r1))))
566 "CCL program to encode Mac Roman")
567
568 (make-coding-system
569 'mac-roman 4 ?M
570 "Mac Roman Encoding (MIME:MACINTOSH)."
571 '(decode-mac-roman . encode-mac-roman)
572 '((safe-chars . mac-roman-encoder)
573 (valid-codes (0 . 255))
574 (mime-charset . macintosh))) ; per IANA, rfc1345
575 388
576 (defconst diacritic-composition-pattern "\\C^\\c^+") 389 (defconst diacritic-composition-pattern "\\C^\\c^+")
577 390
578 (defun diacritic-compose-region (beg end) 391 (defun diacritic-compose-region (beg end)
579 "Compose diacritic characters in the region. 392 "Compose diacritic characters in the region.
619 432
620 ;; Register a function to compose Unicode diacrtics and marks. 433 ;; Register a function to compose Unicode diacrtics and marks.
621 (let ((patterns '(("\\C^\\c^+" . diacritic-composition-function)))) 434 (let ((patterns '(("\\C^\\c^+" . diacritic-composition-function))))
622 (let ((c #x300)) 435 (let ((c #x300))
623 (while (<= c #x362) 436 (while (<= c #x362)
624 (aset composition-function-table (decode-char 'ucs c) patterns) 437 (aset composition-function-table (decode-char 'unicode c) patterns)
625 (setq c (1+ c))) 438 (setq c (1+ c)))
626 (setq c #x20d0) 439 (setq c #x20d0)
627 (while (<= c #x20e3) 440 (while (<= c #x20e3)
628 (aset composition-function-table (decode-char 'ucs c) patterns) 441 (aset composition-function-table (decode-char 'unicode c) patterns)
629 (setq c (1+ c))))) 442 (setq c (1+ c)))))
630 443
631 (provide 'european) 444 (provide 'european)
632 445
633 ;;; european.el ends here 446 ;;; european.el ends here