Commit | Line | Data |
---|---|---|
e8af40ee | 1 | ;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*- |
4ed46869 | 2 | |
38141d20 GM |
3 | ;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
4 | ;; 2008 Free Software Foundation, Inc. | |
7976eda0 | 5 | ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
38141d20 | 6 | ;; 2005, 2006, 2007, 2008 |
eaa61218 KH |
7 | ;; National Institute of Advanced Industrial Science and Technology (AIST) |
8 | ;; Registration Number H14PRO021 | |
8f924df7 KH |
9 | ;; Copyright (C) 2003 |
10 | ;; National Institute of Advanced Industrial Science and Technology (AIST) | |
11 | ;; Registration Number H13PRO009 | |
4ed46869 KH |
12 | |
13 | ;; Keywords: multilingual, European | |
14 | ||
15 | ;; This file is part of GNU Emacs. | |
16 | ||
17 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
18 | ;; it under the terms of the GNU General Public License as published by | |
d7142f3e | 19 | ;; the Free Software Foundation; either version 3, or (at your option) |
4ed46869 KH |
20 | ;; any later version. |
21 | ||
22 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
23 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | ;; GNU General Public License for more details. | |
26 | ||
27 | ;; You should have received a copy of the GNU General Public License | |
369314dc | 28 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
3a35cf56 LK |
29 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
30 | ;; Boston, MA 02110-1301, USA. | |
4ed46869 KH |
31 | |
32 | ;;; Commentary: | |
33 | ||
6b61353c KH |
34 | ;; For European scripts, all the ISO Latin character sets are |
35 | ;; supported, along with various others. | |
4ed46869 KH |
36 | |
37 | ;;; Code: | |
38 | ||
5c4794f3 | 39 | ;; Latin-1 (ISO-8859-1) |
335a7ad7 | 40 | |
335a7ad7 | 41 | (set-language-info-alist |
e1915ab3 | 42 | "Latin-1" '((charset iso-8859-1) |
98a51523 | 43 | (coding-system iso-latin-1 iso-latin-9 windows-1252) |
3617715a | 44 | (coding-priority iso-latin-1) |
e1915ab3 | 45 | (nonascii-translation . iso-8859-1) |
bed54678 | 46 | (unibyte-display . iso-latin-1) |
3e56710f | 47 | (input-method . "latin-1-prefix") |
5c4794f3 | 48 | (sample-text |
327719ee | 49 | . "Hello, Hej, Tere, Hei, Bonjour, Gr\e$(D+d)N\e(B Gott, Ciao, \e$(D"B\e(BHola!") |
3617715a | 50 | (documentation . "\ |
cce3ba48 DL |
51 | This language environment is a generic one for the Latin-1 (ISO-8859-1) |
52 | character set which supports the following European languages: | |
53 | Albanian, Basque, Breton, Catalan, Danish, Dutch, English, Faeroese, | |
54 | Finnish, French (with restrictions -- see Latin-9), Frisian, Galician, | |
55 | German, Greenlandic, Icelandic, Irish Gaelic (new orthography), | |
56 | Italian, Latin, Luxemburgish, Norwegian, Portuguese, Rhaeto-Romanic, | |
57 | Scottish Gaelic, Spanish, and Swedish. | |
cd53f29e KH |
58 | We also have specific language environments for the following languages: |
59 | For Dutch, \"Dutch\". | |
60 | For German, \"German\". | |
cc01e274 | 61 | For French, \"French\". |
6f3ab39c FP |
62 | For Italian, \"Italian\". |
63 | For Slovenian, \"Slovenian\". | |
64 | For Spanish, \"Spanish\". | |
cce3ba48 DL |
65 | |
66 | Latin-1 also covers several written languages outside Europe, including | |
67 | Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans.")) | |
3617715a KH |
68 | '("European")) |
69 | ||
335a7ad7 | 70 | \f |
5c4794f3 | 71 | ;; Latin-2 (ISO-8859-2) |
335a7ad7 | 72 | |
e1915ab3 KH |
73 | (define-coding-system 'iso-latin-2 |
74 | "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)." | |
75 | :coding-type 'charset | |
76 | :mnemonic ?2 | |
77 | :charset-list '(iso-8859-2) | |
f15f44a9 | 78 | :mime-charset 'iso-8859-2) |
4ed46869 | 79 | |
71eabd24 | 80 | (define-coding-system-alias 'iso-8859-2 'iso-latin-2) |
300c450d | 81 | (define-coding-system-alias 'latin-2 'iso-latin-2) |
4b9121fc | 82 | |
335a7ad7 | 83 | (set-language-info-alist |
e1915ab3 | 84 | "Latin-2" '((charset iso-8859-2) |
98a51523 | 85 | (coding-system iso-latin-2 windows-1250) |
3617715a | 86 | (coding-priority iso-latin-2) |
e1915ab3 | 87 | (nonascii-translation . iso-8859-2) |
bed54678 | 88 | (unibyte-display . iso-latin-2) |
3e56710f | 89 | (input-method . "latin-2-prefix") |
3617715a | 90 | (documentation . "\ |
cce3ba48 | 91 | This language environment is a generic one for the Latin-2 (ISO-8859-2) |
e325120d | 92 | character set which supports the following languages: |
60763153 | 93 | Albanian, Czech, English, German, Hungarian, Polish, Romanian, |
59c1ccf2 | 94 | Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower), |
e325120d KH |
95 | and Swedish. |
96 | We also have specific language environments for the following languages: | |
97 | For Czech, \"Czech\". | |
eae03b2d | 98 | For Croatian, \"Croatian\". |
a49f9488 | 99 | For Polish, \"Polish\". |
e325120d KH |
100 | For Romanian, \"Romanian\". |
101 | For Slovak, \"Slovak\".")) | |
3617715a KH |
102 | '("European")) |
103 | ||
335a7ad7 | 104 | \f |
5c4794f3 | 105 | ;; Latin-3 (ISO-8859-3) |
335a7ad7 | 106 | |
e1915ab3 KH |
107 | (define-coding-system 'iso-latin-3 |
108 | "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)." | |
109 | :coding-type 'charset | |
110 | :mnemonic ?3 | |
111 | :charset-list '(iso-8859-3) | |
f15f44a9 | 112 | :mime-charset 'iso-8859-3) |
4ed46869 | 113 | |
71eabd24 | 114 | (define-coding-system-alias 'iso-8859-3 'iso-latin-3) |
300c450d | 115 | (define-coding-system-alias 'latin-3 'iso-latin-3) |
4b9121fc | 116 | |
335a7ad7 | 117 | (set-language-info-alist |
e1915ab3 | 118 | "Latin-3" '((charset iso-8859-3) |
3617715a KH |
119 | (coding-system iso-latin-3) |
120 | (coding-priority iso-latin-3) | |
e1915ab3 | 121 | (nonascii-translation . iso-8859-3) |
bed54678 | 122 | (unibyte-display . iso-latin-3) |
3e56710f | 123 | (input-method . "latin-3-prefix") |
3617715a | 124 | (documentation . "\ |
60763153 RS |
125 | These languages are supported with the Latin-3 (ISO-8859-3) character set: |
126 | Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician, | |
3617715a KH |
127 | German, Italian, Maltese, Spanish, and Turkish.")) |
128 | '("European")) | |
129 | ||
335a7ad7 | 130 | \f |
5c4794f3 | 131 | ;; Latin-4 (ISO-8859-4) |
335a7ad7 | 132 | |
e1915ab3 KH |
133 | (define-coding-system 'iso-latin-4 |
134 | "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)." | |
135 | :coding-type 'charset | |
136 | :mnemonic ?4 | |
137 | :charset-list '(iso-8859-4) | |
f15f44a9 | 138 | :mime-charset 'iso-8859-4) |
4ed46869 | 139 | |
71eabd24 | 140 | (define-coding-system-alias 'iso-8859-4 'iso-latin-4) |
300c450d | 141 | (define-coding-system-alias 'latin-4 'iso-latin-4) |
4b9121fc | 142 | |
335a7ad7 | 143 | (set-language-info-alist |
e1915ab3 | 144 | "Latin-4" '((charset iso-8859-4) |
3617715a KH |
145 | (coding-system iso-8859-4) |
146 | (coding-priority iso-8859-4) | |
e1915ab3 | 147 | (nonascii-translation . iso-8859-4) |
bed54678 | 148 | (unibyte-display . iso-8859-4) |
11f340ed | 149 | (input-method . "latin-4-postfix") |
3617715a | 150 | (documentation . "\ |
60763153 RS |
151 | These languages are supported with the Latin-4 (ISO-8859-4) character set: |
152 | Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, | |
3617715a KH |
153 | Latvian, Lithuanian, and Norwegian.")) |
154 | '("European")) | |
155 | ||
335a7ad7 | 156 | \f |
5c4794f3 | 157 | ;; Latin-5 (ISO-8859-9) |
335a7ad7 | 158 | |
e1915ab3 KH |
159 | (define-coding-system 'iso-latin-5 |
160 | "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)." | |
161 | :coding-type 'charset | |
162 | :mnemonic ?9 | |
163 | :charset-list '(iso-8859-9) | |
f15f44a9 | 164 | :mime-charset 'iso-8859-9) |
4ed46869 | 165 | |
71eabd24 | 166 | (define-coding-system-alias 'iso-8859-9 'iso-latin-5) |
300c450d | 167 | (define-coding-system-alias 'latin-5 'iso-latin-5) |
4b9121fc | 168 | |
3617715a | 169 | (set-language-info-alist |
e1915ab3 | 170 | "Latin-5" '((charset iso-8859-9) |
3617715a KH |
171 | (coding-system iso-latin-5) |
172 | (coding-priority iso-latin-5) | |
e1915ab3 | 173 | (nonascii-translation . iso-8859-9) |
bed54678 | 174 | (unibyte-display . iso-latin-5) |
11f340ed | 175 | (input-method . "latin-5-postfix") |
a49f9488 DL |
176 | (documentation . "Support for Latin-5.\ |
177 | See also the Turkish environment.")) | |
cce3ba48 DL |
178 | '("European")) |
179 | ||
180 | \f | |
0859301a DL |
181 | ;; Latin-6 (ISO-8859-10) |
182 | ||
183 | (define-coding-system 'iso-latin-6 | |
184 | "ISO 2022 based 8-bit encoding for Latin-6 (MIME:ISO-8859-10)." | |
185 | :coding-type 'charset | |
186 | :mnemonic ?9 | |
187 | :charset-list '(iso-8859-10) | |
188 | :mime-charset 'iso-8859-10) | |
189 | ||
190 | (define-coding-system-alias 'iso-8859-10 'iso-latin-6) | |
191 | (define-coding-system-alias 'latin-6 'iso-latin-6) | |
192 | ||
193 | (set-language-info-alist | |
194 | "Latin-6" '((charset iso-8859-10) | |
195 | (coding-system iso-latin-6) | |
196 | (coding-priority iso-latin-6) | |
197 | (nonascii-translation . iso-8859-10) | |
0859301a DL |
198 | (unibyte-display . iso-latin-6) |
199 | ;; Fixme: input method. | |
200 | (documentation . "Support for generic Latin-6 (Northern European).")) | |
201 | '("European")) | |
202 | ||
203 | \f | |
204 | ;; Latin-7 (ISO-8859-13) | |
205 | ||
206 | (define-coding-system 'iso-latin-7 | |
207 | "ISO 2022 based 8-bit encoding for Latin-7 (MIME:ISO-8859-13)." | |
208 | :coding-type 'charset | |
209 | :mnemonic ?9 | |
210 | :charset-list '(iso-8859-13) | |
211 | :mime-charset 'iso-8859-13) | |
212 | ||
213 | (define-coding-system-alias 'iso-8859-13 'iso-latin-7) | |
214 | (define-coding-system-alias 'latin-7 'iso-latin-7) | |
215 | ||
216 | (set-language-info-alist | |
217 | "Latin-7" '((charset iso-8859-13) | |
218 | (coding-system iso-latin-7) | |
219 | (coding-priority iso-latin-7) | |
220 | (nonascii-translation . iso-8859-13) | |
0859301a DL |
221 | (unibyte-display . iso-latin-7) |
222 | ;; Fixme: input method. | |
223 | (documentation . "Support for generic Latin-7 (Baltic Rim).")) | |
224 | '("European")) | |
225 | \f | |
cce3ba48 DL |
226 | ;; Latin-8 (ISO-8859-14) |
227 | ||
e1915ab3 KH |
228 | (define-coding-system 'iso-latin-8 |
229 | "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)." | |
230 | :coding-type 'charset | |
231 | ;; `W' for `Welsh', since `C' for `Celtic' is taken. | |
232 | :mnemonic ?W | |
233 | :charset-list '(iso-8859-14) | |
f15f44a9 | 234 | :mime-charset 'iso-8859-14) |
cce3ba48 DL |
235 | |
236 | (define-coding-system-alias 'iso-8859-14 'iso-latin-8) | |
237 | (define-coding-system-alias 'latin-8 'iso-latin-8) | |
238 | ||
cce3ba48 | 239 | (set-language-info-alist |
e1915ab3 | 240 | "Latin-8" '((charset iso-8859-14) |
cce3ba48 DL |
241 | (coding-system iso-latin-8) |
242 | (coding-priority iso-latin-8) | |
e1915ab3 | 243 | (nonascii-translation . iso-8859-14) |
cce3ba48 | 244 | (unibyte-display . iso-latin-8) |
27ff18c9 DL |
245 | (input-method . "latin-8-prefix") |
246 | ;; Fixme: Welsh/Ga{e}lic greetings | |
327719ee | 247 | (sample-text . "\e,_"\e(B \e$(D+q\e(B \e$(D*t\e(B") |
cce3ba48 DL |
248 | (documentation . "\ |
249 | This language environment is a generic one for the Latin-8 (ISO-8859-14) | |
27ff18c9 | 250 | character set which supports the Celtic languages, including those not |
5ef35063 WL |
251 | covered by other ISO-8859 character sets: |
252 | Welsh, Manx Gaelic and Irish Gaelic (old orthography).")) | |
3617715a | 253 | '("European")) |
cce3ba48 DL |
254 | \f |
255 | ;; Latin-9 (ISO-8859-15) | |
256 | ||
e1915ab3 KH |
257 | (define-coding-system 'iso-latin-9 |
258 | "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)." | |
259 | :coding-type 'charset | |
260 | ;; `0' for `Latin-0' | |
261 | :mnemonic ?0 | |
262 | :charset-list '(iso-8859-15) | |
f15f44a9 | 263 | :mime-charset 'iso-8859-15) |
cce3ba48 DL |
264 | |
265 | (define-coding-system-alias 'iso-8859-15 'iso-latin-9) | |
266 | (define-coding-system-alias 'latin-9 'iso-latin-9) | |
267 | (define-coding-system-alias 'latin-0 'iso-latin-9) | |
3617715a | 268 | |
cce3ba48 | 269 | (set-language-info-alist |
e1915ab3 | 270 | "Latin-9" '((charset iso-8859-15) |
cce3ba48 DL |
271 | (coding-system iso-latin-9) |
272 | (coding-priority iso-latin-9) | |
e1915ab3 | 273 | (nonascii-translation . iso-8859-15) |
cce3ba48 | 274 | (unibyte-display . iso-latin-9) |
27ff18c9 | 275 | (input-method . "latin-9-prefix") |
cce3ba48 | 276 | (sample-text |
327719ee | 277 | . "AVE. \e$(D*^+^*v+v)-)M*s\e(B \e$(Q)!\e(B") |
cce3ba48 DL |
278 | (documentation . "\ |
279 | This language environment is a generic one for the Latin-9 (ISO-8859-15) | |
280 | character set which supports the same languages as Latin-1 with the | |
281 | addition of the Euro sign and some additional French and Finnish letters. | |
282 | Latin-9 is sometimes nicknamed `Latin-0'.")) | |
283 | '("European")) | |
a73d7753 MB |
284 | |
285 | (set-language-info-alist | |
286 | "Esperanto" '((tutorial . "TUTORIAL.eo") | |
287 | (charset ascii latin-iso8859-3) | |
288 | (coding-system iso-latin-3) | |
289 | (coding-priority iso-latin-3) | |
290 | (nonascii-translation . latin-iso8859-3) | |
291 | (unibyte-syntax . "latin-3") | |
292 | (unibyte-display . iso-latin-3) | |
293 | (input-method . "latin-3-prefix") | |
294 | (documentation . "Support for Esperanto with ISO-8859-3 character set.")) | |
295 | '("European")) | |
296 | ||
3617715a | 297 | \f |
accf24cd DL |
298 | (define-coding-system 'windows-1250 |
299 | "windows-1250 (Central European) encoding (MIME: WINDOWS-1250)" | |
300 | :coding-type 'charset | |
301 | :mnemonic ?* | |
302 | :charset-list '(windows-1250) | |
303 | :mime-charset 'windows-1250) | |
304 | (define-coding-system-alias 'cp1250 'windows-1250) | |
305 | ||
06d5cc88 | 306 | (define-coding-system 'windows-1252 |
accf24cd | 307 | "windows-1252 (Western European) encoding (MIME: WINDOWS-1252)" |
06d5cc88 DL |
308 | :coding-type 'charset |
309 | :mnemonic ?* | |
310 | :charset-list '(windows-1252) | |
311 | :mime-charset 'windows-1252) | |
312 | (define-coding-system-alias 'cp1252 'windows-1252) | |
accf24cd DL |
313 | |
314 | (define-coding-system 'windows-1254 | |
315 | "windows-1254 (Turkish) encoding (MIME: WINDOWS-1254)" | |
316 | :coding-type 'charset | |
317 | :mnemonic ?* | |
318 | :charset-list '(windows-1254) | |
319 | :mime-charset 'windows-1254) | |
320 | (define-coding-system-alias 'cp1254 'windows-1254) | |
321 | ||
322 | (define-coding-system 'windows-1257 | |
323 | "windows-1257 (Baltic) encoding (MIME: WINDOWS-1257)" | |
324 | :coding-type 'charset | |
325 | :mnemonic ?* | |
326 | :charset-list '(windows-1257) | |
327 | :mime-charset 'windows-1257) | |
328 | (define-coding-system-alias 'cp1257 'windows-1257) | |
0859301a DL |
329 | |
330 | (define-coding-system 'cp850 | |
331 | "DOS codepage 850 (Western European)" | |
332 | :coding-type 'charset | |
333 | :mnemonic ?D | |
334 | :charset-list '(cp850) | |
335 | :mime-charset 'cp850) | |
336 | (define-coding-system-alias 'ibm850 'cp850) | |
6d2186ff DL |
337 | |
338 | (define-coding-system 'cp852 | |
339 | "DOS codepage 852 (Slavic)" | |
340 | :coding-type 'charset | |
341 | :mnemonic ?D | |
342 | :charset-list '(cp852) | |
343 | :mime-charset 'cp852) | |
344 | (define-coding-system-alias 'ibm852 'cp852) | |
345 | ||
346 | (define-coding-system 'cp857 | |
347 | "DOS codepage 857 (Turkish)" | |
348 | :coding-type 'charset | |
349 | :mnemonic ?D | |
350 | :charset-list '(cp857) | |
351 | :mime-charset 'cp857) | |
352 | (define-coding-system-alias 'ibm857 'cp857) | |
353 | ||
24d51014 DL |
354 | (define-coding-system 'cp858 |
355 | "Codepage 858 (Multilingual Latin I + Euro)" | |
356 | :coding-type 'charset | |
357 | :mnemonic ?D | |
358 | :charset-list '(cp858) | |
359 | :mime-charset 'cp858) | |
360 | ||
6d2186ff DL |
361 | (define-coding-system 'cp860 |
362 | "DOS codepage 860 (Portuguese)" | |
363 | :coding-type 'charset | |
364 | :mnemonic ?D | |
365 | :charset-list '(cp860) | |
366 | :mime-charset 'cp860) | |
367 | (define-coding-system-alias 'ibm860 'cp860) | |
368 | ||
369 | (define-coding-system 'cp861 | |
370 | "DOS codepage 861 (Icelandic)" | |
371 | :coding-type 'charset | |
372 | :mnemonic ?D | |
373 | :charset-list '(cp861) | |
374 | :mime-charset 'cp861) | |
375 | (define-coding-system-alias 'ibm861 'cp861) | |
376 | ||
377 | (define-coding-system 'cp863 | |
378 | "DOS codepage 863 (French Canadian)" | |
379 | :coding-type 'charset | |
380 | :mnemonic ?D | |
381 | :charset-list '(cp863) | |
382 | :mime-charset 'cp863) | |
383 | (define-coding-system-alias 'ibm863 'cp863) | |
384 | ||
385 | (define-coding-system 'cp865 | |
386 | "DOS codepage 865 (Norwegian/Danish)" | |
387 | :coding-type 'charset | |
388 | :mnemonic ?D | |
389 | :charset-list '(cp865) | |
390 | :mime-charset 'cp865) | |
391 | (define-coding-system-alias 'ibm865 'cp865) | |
392 | ||
393 | (define-coding-system 'cp437 | |
394 | "DOS codepage 437" | |
395 | :coding-type 'charset | |
396 | :mnemonic ?D | |
397 | :charset-list '(cp437) | |
398 | :mime-charset 'cp437) | |
399 | (define-coding-system-alias 'ibm437 'cp437) | |
06d5cc88 | 400 | \f |
6f3ab39c FP |
401 | (set-language-info-alist |
402 | "Dutch" '((tutorial . "TUTORIAL.nl") | |
8f924df7 | 403 | (charset iso-8859-1) |
6f3ab39c FP |
404 | (coding-system iso-latin-1 iso-latin-9) |
405 | (coding-priority iso-latin-1) | |
8f924df7 | 406 | (nonascii-translation . iso-8859-1) |
6f3ab39c FP |
407 | (unibyte-display . iso-latin-1) |
408 | (input-method . "dutch") | |
409 | (sample-text . "Er is een aantal manieren waarop je dit kan doen") | |
410 | (documentation . "\ | |
411 | This language environment is almost the same as Latin-1, | |
412 | but it selects the Dutch tutorial and input method.")) | |
413 | '("European")) | |
414 | ||
4ed46869 | 415 | (set-language-info-alist |
bed54678 | 416 | "German" '((tutorial . "TUTORIAL.de") |
e1915ab3 | 417 | (charset iso-8859-1) |
edc64f42 | 418 | (coding-system iso-latin-1 iso-latin-9) |
3617715a | 419 | (coding-priority iso-latin-1) |
e1915ab3 | 420 | (nonascii-translation . iso-8859-1) |
3e56710f | 421 | (input-method . "german-postfix") |
bed54678 | 422 | (unibyte-display . iso-latin-1) |
3617715a KH |
423 | (sample-text . "\ |
424 | German (Deutsch Nord) Guten Tag | |
327719ee | 425 | German (Deutsch S\e$(D+d\e(Bd) Gr\e$(D+d)N\e(B Gott") |
3617715a KH |
426 | (documentation . "\ |
427 | This language environment is almost the same as Latin-1, | |
70a4f3ea WL |
428 | but sets the default input method to \"german-postfix\". |
429 | Additionally, it selects the German tutorial.")) | |
3617715a | 430 | '("European")) |
8dfef503 | 431 | |
fdd2d14d EZ |
432 | (set-language-info-alist |
433 | "French" '((tutorial . "TUTORIAL.fr") | |
e1915ab3 | 434 | (charset iso-8859-1) |
edc64f42 | 435 | (coding-system iso-latin-1 iso-latin-9) |
fdd2d14d | 436 | (coding-priority iso-latin-1) |
e1915ab3 | 437 | (nonascii-translation . iso-8859-1) |
fdd2d14d EZ |
438 | (unibyte-display . iso-latin-1) |
439 | (input-method . "latin-1-prefix") | |
327719ee | 440 | (sample-text . "French (Fran\e$(D+.\e(Bais) Bonjour, Salut") |
fdd2d14d EZ |
441 | (documentation . "\ |
442 | This language environment is almost the same as Latin-1, | |
b1c0272c | 443 | but it selects the French tutorial and input method.")) |
fdd2d14d EZ |
444 | '("European")) |
445 | ||
0dcfc7bc FP |
446 | (set-language-info-alist |
447 | "Italian" '((tutorial . "TUTORIAL.it") | |
8f924df7 | 448 | (charset iso-8859-1) |
0dcfc7bc FP |
449 | (coding-system iso-latin-1 iso-latin-9) |
450 | (coding-priority iso-latin-1) | |
8f924df7 | 451 | (nonascii-translation . iso-8859-1) |
0dcfc7bc FP |
452 | (unibyte-display . iso-latin-1) |
453 | (input-method . "italian-postfix") | |
454 | (sample-text . "Salve, ciao!") | |
455 | (documentation . "\ | |
456 | This language environment is almost the same as Latin-1, | |
457 | but sets the default input method to \"italian-postfix\". | |
458 | Additionally, it selects the Italian tutorial.")) | |
459 | '("European")) | |
460 | ||
e0980142 | 461 | (set-language-info-alist |
e1915ab3 | 462 | "Slovenian" '((charset iso-8859-2) |
0fbd0425 | 463 | (coding-system . (iso-8859-2 windows-1250)) |
e0980142 | 464 | (coding-priority . (iso-8859-2)) |
e1915ab3 | 465 | (nonascii-translation . iso-8859-2) |
57ef7816 | 466 | (input-method . "slovenian") |
e0980142 RS |
467 | (unibyte-display . iso-8859-2) |
468 | (tutorial . "TUTORIAL.sl") | |
327719ee | 469 | (sample-text . "\e$(D*v\e(Belimo vam uspe\e$(D+^\e(Ben dan!") |
b1c0272c FP |
470 | (documentation . "\ |
471 | This language environment is almost the same as Latin-2, | |
472 | but it selects the Slovenian tutorial and input method.")) | |
e0980142 RS |
473 | '("European")) |
474 | ||
891258f2 GM |
475 | (set-language-info-alist |
476 | "Spanish" '((tutorial . "TUTORIAL.es") | |
e1915ab3 | 477 | (charset iso-8859-1) |
edc64f42 | 478 | (coding-system iso-latin-1 iso-latin-9) |
891258f2 GM |
479 | (coding-priority iso-latin-1) |
480 | (input-method . "spanish-postfix") | |
8f924df7 | 481 | (nonascii-translation . iso-8859-1) |
891258f2 | 482 | (unibyte-display . iso-latin-1) |
327719ee | 483 | (sample-text . "Spanish (Espa\e$(D+P\e(Bol) \e$(D"B\e(BHola!") |
891258f2 GM |
484 | (documentation . "\ |
485 | This language environment is almost the same as Latin-1, | |
70a4f3ea | 486 | but it sets the default input method to \"spanish-postfix\", |
a959e723 | 487 | and it selects the Spanish tutorial.")) |
891258f2 GM |
488 | '("European")) |
489 | ||
d22c4fb9 KH |
490 | ;; For Turkish, the character set ISO-8859-9 (Latin-5) is used. But, |
491 | ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3) | |
492 | ;; was used for Turkish. Those who use Latin-3 for Turkish should use | |
493 | ;; "Latin-3" language environment. | |
494 | ||
495 | (set-language-info-alist | |
e1915ab3 | 496 | "Turkish" '((charset iso-8859-9) |
0fbd0425 | 497 | (coding-system iso-latin-5 windows-1254 iso-latin-3) |
d22c4fb9 | 498 | (coding-priority iso-latin-5) |
e1915ab3 | 499 | (nonascii-translation . iso-8859-9) |
d22c4fb9 KH |
500 | (unibyte-display . iso-latin-5) |
501 | (input-method . "turkish-postfix") | |
327719ee | 502 | (sample-text . "Turkish (T\e$(D+d\e(Brk\e$(D+.\e(Be) Merhaba") |
09e5eab5 KH |
503 | (setup-function . turkish-case-conversion-enable) |
504 | (setup-function . turkish-case-conversion-disable) | |
24d51014 DL |
505 | (documentation . "Support for Turkish. |
506 | Differs from the Latin-5 environment in using the `turkish-postfix' input | |
327719ee | 507 | method and applying Turkish case rules for the characters i, I, \e$(D)E\e(B, \e$(D*D\e(B."))) |
d22c4fb9 | 508 | |
09e5eab5 KH |
509 | (defun turkish-case-conversion-enable () |
510 | "Set up Turkish case conversion of `i' and `I' into `\e$(D*D\e(B' and `\e$(D)E\e(B'." | |
511 | (let ((table (standard-case-table))) | |
512 | (set-case-syntax-pair ?\e$(D*D\e(B ?i table) | |
513 | (set-case-syntax-pair ?I ?\e$(D)E\e(B table))) | |
514 | ||
515 | (defun turkish-case-conversion-disable () | |
516 | "Set up normal (non-Turkish) case conversion of `i' into `I'." | |
517 | (let ((table (standard-case-table))) | |
518 | (set-case-syntax-pair ?I ?i table) | |
519 | (set-case-syntax ?\e$(D*D\e(B "w" table) | |
520 | (set-case-syntax ?\e$(D)E\e(B "w" table))) | |
521 | ||
b9427ca6 KH |
522 | ;; Polish ISO 8859-2 environment. |
523 | ;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl> | |
524 | ;; Keywords: multilingual, Polish | |
525 | ||
b9427ca6 | 526 | (set-language-info-alist |
8f924df7 KH |
527 | "Polish" '((charset iso-8859-2) |
528 | (coding-system iso-8859-2 windows-1250) | |
529 | (coding-priority iso-8859-2) | |
b9427ca6 | 530 | (input-method . "polish-slash") |
8f924df7 | 531 | (nonascii-translation . iso-8859-2) |
b9427ca6 KH |
532 | (unibyte-display . iso-8859-2) |
533 | (tutorial . "TUTORIAL.pl") | |
327719ee | 534 | (sample-text . "P\e$(D+Q\e(Bjd\e$(D+u\e(B, ki\e$(D+M\e(B-\e$(D+w\e(Be t\e$(D+8\e(B chmurno\e$(D+\++\e(B w g\e$(D)H+(\e(Bb flaszy") |
b9427ca6 KH |
535 | (documentation . t)) |
536 | '("European")) | |
537 | ||
3286933f DL |
538 | (set-language-info-alist |
539 | "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based | |
540 | (coding-priority utf-8 latin-8) | |
e1915ab3 | 541 | (nonascii-translation . iso-8859-14) |
3286933f DL |
542 | (input-method . "welsh") |
543 | (documentation . "Support for Welsh, using Unicode.")) | |
544 | '("European")) | |
545 | ||
eae03b2d DL |
546 | (set-language-info-alist |
547 | "Latin-6" `((coding-system latin-6) | |
548 | (coding-priority latin-6) | |
549 | (nonascii-translation . ,(get 'decode-iso-latin-6 'translation-table)) | |
bccb30c4 | 550 | (input-method . "latin-prefix") |
eae03b2d DL |
551 | (features code-pages) |
552 | (documentation . "Support for Latin-6.")) | |
553 | '("European")) | |
554 | ||
3286933f DL |
555 | (set-language-info-alist |
556 | "Latin-7" `((coding-system latin-7) | |
557 | (coding-priority latin-7) | |
e1915ab3 | 558 | (nonascii-translation . iso-8859-13) |
bccb30c4 | 559 | (input-method . "latin-prefix") |
3286933f DL |
560 | (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian.")) |
561 | '("European")) | |
562 | ||
563 | (set-language-info-alist | |
0fbd0425 | 564 | "Lithuanian" `((coding-system latin-7 windows-1257) |
3286933f | 565 | (coding-priority latin-7) |
e1915ab3 | 566 | (nonascii-translation . iso-8859-13) |
3286933f | 567 | (input-method . "lithuanian-keyboard") |
3286933f DL |
568 | (documentation . "Support for Lithuanian.")) |
569 | '("European")) | |
570 | ||
571 | (set-language-info-alist | |
0fbd0425 | 572 | "Latvian" `((coding-system latin-7 windows-1257) |
3286933f | 573 | (coding-priority latin-7) |
e1915ab3 | 574 | (nonascii-translation . iso-8859-13) |
3286933f | 575 | (input-method . "latvian-keyboard") |
3286933f DL |
576 | (documentation . "Support for Latvian.")) |
577 | '("European")) | |
adc7d9cd RS |
578 | |
579 | (set-language-info-alist | |
88ee27e5 | 580 | "Swedish" '((tutorial . "TUTORIAL.sv") |
8f924df7 | 581 | (charset iso-8859-1) |
adc7d9cd RS |
582 | (coding-system iso-latin-1) |
583 | (coding-priority iso-latin-1) | |
8f924df7 | 584 | (nonascii-translation . iso-8859-1) |
adc7d9cd RS |
585 | (unibyte-display . iso-latin-1) |
586 | (sample-text . "Goddag Hej") | |
587 | (documentation . "Support for Swedish")) | |
588 | '("European")) | |
eae03b2d DL |
589 | |
590 | (set-language-info-alist | |
8f924df7 KH |
591 | "Croatian" '((charset iso-8859-2) |
592 | (coding-system iso-8859-2) | |
593 | (coding-priority iso-8859-2) | |
eae03b2d | 594 | (input-method . "croatian") |
8f924df7 | 595 | (nonascii-translation . iso-8859-2) |
eae03b2d DL |
596 | (unibyte-display . iso-8859-2) |
597 | (documentation . "Support for Croatian with Latin-2 encoding.")) | |
598 | '("European")) | |
8f924df7 | 599 | |
c7a73294 DK |
600 | (set-language-info-alist |
601 | "Brazilian Portuguese" '((tutorial . "TUTORIAL.pt_BR") | |
327719ee | 602 | (charset iso-8859-1) |
c7a73294 DK |
603 | (coding-system iso-latin-1 iso-latin-9) |
604 | (coding-priority iso-latin-1) | |
327719ee MB |
605 | (nonascii-translation . iso-8859-1) |
606 | (unibyte-display . iso-8859-1) | |
c7a73294 DK |
607 | (input-method . "latin-1-prefix") |
608 | (sample-text . "Oi") | |
609 | (documentation . "Support for Brazilian Portuguese.")) | |
610 | '("European")) | |
327719ee | 611 | |
71070f12 | 612 | \f |
e1915ab3 KH |
613 | (define-coding-system 'mac-roman |
614 | "Mac Roman Encoding (MIME:MACINTOSH)." | |
615 | :coding-type 'charset | |
616 | :mnemonic ?M | |
617 | :charset-list '(mac-roman) | |
e1915ab3 | 618 | :mime-charset 'macintosh) |
71070f12 | 619 | |
accf24cd DL |
620 | (define-coding-system 'next |
621 | "NeXTstep encoding" | |
622 | :coding-type 'charset | |
623 | :mnemonic ?* | |
624 | :charset-list '(next) | |
625 | :mime-charset 'next) | |
0859301a DL |
626 | |
627 | (define-coding-system 'hp-roman8 | |
628 | "Hewlet-Packard roman-8 encoding (MIME:ROMAN-8)" | |
629 | :coding-type 'charset | |
630 | :mnemonic ?* | |
631 | :charset-list '(hp-roman8) | |
632 | :mime-charset 'hp-roman8) | |
633 | (define-coding-system-alias 'roman8 'hp-roman8) | |
634 | ||
635 | (define-coding-system 'adobe-standard-encoding | |
636 | "Adobe `standard' encoding for PostScript" | |
637 | :coding-type 'charset | |
638 | :mnemonic ?* | |
76429b9a DL |
639 | :charset-list '(adobe-standard-encoding) |
640 | :mime-charset 'adobe-standard-encoding) | |
fc22b4eb | 641 | |
71070f12 | 642 | \f |
fc22b4eb KH |
643 | ;; For automatic composing of diacritics and combining marks. |
644 | (dolist (range '( ;; combining diacritical marks | |
645 | (#x0300 #x0314 (tc . bc)) | |
646 | (#x0315 (tr . bl)) | |
647 | (#x0316 #x0319 (bc . tc)) | |
648 | (#x031A (tr . cl)) | |
649 | (#x031B #x0320 (bc . tc)) | |
650 | (#x0321 (Br . tr)) | |
651 | (#x0322 (Br . tl)) | |
652 | (#x0323 #x0333 (bc . tc)) | |
653 | (#x0334 #x0338 (Bc . Bc)) | |
654 | (#x0339 #x033C (bc . tc)) | |
655 | (#x033D #x033F (tc . bc)) | |
656 | (#x0340 (tl . bc)) | |
657 | (#x0341 (tr . bc)) | |
658 | (#x0342 #x0344 (tc . bc)) | |
659 | (#x0345 (bc . tc)) | |
660 | (#x0346 (tc . bc)) | |
661 | (#x0347 #x0349 (bc . tc)) | |
662 | (#x034A #x034C (tc . bc)) | |
663 | (#x034D #x034E (bc . tc)) | |
664 | ;; combining diacritical marks for symbols | |
665 | (#x20D0 #x20D1 (tc . bc)) | |
666 | (#x20D2 #x20D3 (Bc . Bc)) | |
667 | (#x20D4 #x20D7 (tc . bc)) | |
668 | (#x20D8 #x20DA (Bc . Bc)) | |
669 | (#x20DB #x20DC (tc . bc)) | |
670 | (#x20DD #x20E0 (Bc . Bc)) | |
671 | (#x20E1 (tc . bc)) | |
672 | (#x20E2 #x20E3 (Bc . Bc)))) | |
673 | (let* ((from (car range)) | |
674 | (to (if (= (length range) 3) | |
675 | (nth 1 range) | |
676 | from)) | |
677 | (composition (car (last range)))) | |
678 | (while (<= from to) | |
679 | (put-char-code-property from 'diacritic-composition composition) | |
680 | (aset composition-function-table from 'diacritic-composition-function) | |
681 | (setq from (1+ from))))) | |
71070f12 | 682 | |
5180cc01 DL |
683 | (defconst diacritic-composition-pattern "\\C^\\c^+") |
684 | ||
5180cc01 DL |
685 | (defun diacritic-compose-region (beg end) |
686 | "Compose diacritic characters in the region. | |
687 | When called from a program, expects two arguments, | |
688 | positions (integers or markers) specifying the region." | |
689 | (interactive "r") | |
690 | (save-restriction | |
691 | (narrow-to-region beg end) | |
692 | (goto-char (point-min)) | |
693 | (while (re-search-forward diacritic-composition-pattern nil t) | |
1fd730f7 KH |
694 | (if (= (char-syntax (char-after (match-beginning 0))) ?w) |
695 | (compose-region (match-beginning 0) (match-end 0)))))) | |
5180cc01 | 696 | |
5180cc01 DL |
697 | (defun diacritic-compose-string (string) |
698 | "Compose diacritic characters in STRING and return the resulting string." | |
699 | (let ((idx 0)) | |
700 | (while (setq idx (string-match diacritic-composition-pattern string idx)) | |
1fd730f7 KH |
701 | (if (= (char-syntax (aref string idx)) ?w) |
702 | (compose-string string idx (match-end 0))) | |
5180cc01 DL |
703 | (setq idx (match-end 0)))) |
704 | string) | |
a1506d29 | 705 | |
5180cc01 DL |
706 | (defun diacritic-compose-buffer () |
707 | "Compose diacritic characters in the current buffer." | |
708 | (interactive) | |
709 | (diacritic-compose-region (point-min) (point-max))) | |
710 | ||
e32dd5e9 | 711 | (defun diacritic-composition-function (pos to font-object string) |
fc22b4eb KH |
712 | "Compose diacritic text around POS. |
713 | Optional 2nd argument STRING, if non-nil, is a string containing text | |
5180cc01 DL |
714 | to compose. |
715 | ||
fc22b4eb KH |
716 | The return value is the end position of composed characters, |
717 | or nil if no characters are composed." | |
718 | (setq pos (1- pos)) | |
719 | (if string | |
5ef807be KH |
720 | (if (>= pos 0) |
721 | (let ((ch (aref string pos)) | |
722 | start end components ch composition) | |
1fd730f7 | 723 | (when (= (char-syntax ch) ?w) |
5ef807be KH |
724 | (setq start pos |
725 | end (length string) | |
726 | components (list ch) | |
727 | pos (1+ pos)) | |
728 | (while (and | |
729 | (< pos end) | |
730 | (setq ch (aref string pos) | |
731 | composition | |
732 | (get-char-code-property ch | |
733 | 'diacritic-composition))) | |
734 | (setq components (cons ch (cons composition components)) | |
735 | pos (1+ pos))) | |
736 | (compose-string string start pos (nreverse components)) | |
737 | pos))) | |
738 | (if (>= pos (point-min)) | |
739 | (let ((ch (char-after pos)) | |
740 | start end components composition) | |
1fd730f7 | 741 | (when (= (char-syntax ch) ?w) |
5ef807be KH |
742 | (setq start pos |
743 | end (point-max) | |
744 | components (list ch) | |
745 | pos (1+ pos)) | |
746 | (while (and | |
747 | (< pos end) | |
748 | (setq ch (char-after pos) | |
749 | composition | |
750 | (get-char-code-property ch 'diacritic-composition))) | |
751 | (setq components (cons ch (cons composition components)) | |
752 | pos (1+ pos))) | |
753 | (compose-region start pos (nreverse components)) | |
754 | pos))))) | |
5180cc01 | 755 | |
27ff18c9 DL |
756 | (provide 'european) |
757 | ||
6b61353c | 758 | ;;; arch-tag: 9e018b12-fb02-4120-907b-9adeaf84b5c2 |
4ed46869 | 759 | ;;; european.el ends here |