(print_check_string_charset_prop): Fix previous change.
[bpt/emacs.git] / lisp / language / european.el
CommitLineData
e8af40ee 1;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*-
4ed46869 2
891258f2 3;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN.
8f924df7 4;; Licensed to the Free Software Foundation.
eae03b2d 5;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
8f924df7
KH
6;; Copyright (C) 2003
7;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H13PRO009
4ed46869
KH
9
10;; Keywords: multilingual, European
11
12;; This file is part of GNU Emacs.
13
14;; GNU Emacs is free software; you can redistribute it and/or modify
15;; it under the terms of the GNU General Public License as published by
16;; the Free Software Foundation; either version 2, or (at your option)
17;; any later version.
18
19;; GNU Emacs is distributed in the hope that it will be useful,
20;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;; GNU General Public License for more details.
23
24;; You should have received a copy of the GNU General Public License
369314dc
KH
25;; along with GNU Emacs; see the file COPYING. If not, write to the
26;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27;; Boston, MA 02111-1307, USA.
4ed46869
KH
28
29;;; Commentary:
30
0859301a
DL
31;; For European scripts, character sets ISO8859-1,2,3,4,9,10,13,14,15,
32;; windows-1250,2,4,7, mac-roman, adobe-standard-encoding, cp850 and
33;; next are supported.
4ed46869
KH
34
35;;; Code:
36
5c4794f3 37;; Latin-1 (ISO-8859-1)
335a7ad7 38
335a7ad7 39(set-language-info-alist
e1915ab3 40 "Latin-1" '((charset iso-8859-1)
98a51523 41 (coding-system iso-latin-1 iso-latin-9 windows-1252)
3617715a 42 (coding-priority iso-latin-1)
e1915ab3 43 (nonascii-translation . iso-8859-1)
bed54678 44 (unibyte-display . iso-latin-1)
3e56710f 45 (input-method . "latin-1-prefix")
5c4794f3
RS
46 (sample-text
47 . "Hello, Hej, Tere, Hei, Bonjour, Gr\e,A|_\e(B Gott, Ciao, \e,A!\e(BHola!")
3617715a 48 (documentation . "\
cce3ba48
DL
49This language environment is a generic one for the Latin-1 (ISO-8859-1)
50character set which supports the following European languages:
51 Albanian, Basque, Breton, Catalan, Danish, Dutch, English, Faeroese,
52 Finnish, French (with restrictions -- see Latin-9), Frisian, Galician,
53 German, Greenlandic, Icelandic, Irish Gaelic (new orthography),
54 Italian, Latin, Luxemburgish, Norwegian, Portuguese, Rhaeto-Romanic,
55 Scottish Gaelic, Spanish, and Swedish.
cd53f29e
KH
56We also have specific language environments for the following languages:
57 For Dutch, \"Dutch\".
58 For German, \"German\".
cc01e274 59 For French, \"French\".
6f3ab39c
FP
60 For Italian, \"Italian\".
61 For Slovenian, \"Slovenian\".
62 For Spanish, \"Spanish\".
cce3ba48
DL
63
64Latin-1 also covers several written languages outside Europe, including
65Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans."))
3617715a
KH
66 '("European"))
67
335a7ad7 68\f
5c4794f3 69;; Latin-2 (ISO-8859-2)
335a7ad7 70
e1915ab3
KH
71(define-coding-system 'iso-latin-2
72 "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."
73 :coding-type 'charset
74 :mnemonic ?2
75 :charset-list '(iso-8859-2)
f15f44a9 76 :mime-charset 'iso-8859-2)
4ed46869 77
71eabd24 78(define-coding-system-alias 'iso-8859-2 'iso-latin-2)
300c450d 79(define-coding-system-alias 'latin-2 'iso-latin-2)
4b9121fc 80
335a7ad7 81(set-language-info-alist
e1915ab3 82 "Latin-2" '((charset iso-8859-2)
98a51523 83 (coding-system iso-latin-2 windows-1250)
3617715a 84 (coding-priority iso-latin-2)
e1915ab3 85 (nonascii-translation . iso-8859-2)
bed54678 86 (unibyte-display . iso-latin-2)
3e56710f 87 (input-method . "latin-2-prefix")
3617715a 88 (documentation . "\
cce3ba48 89This language environment is a generic one for the Latin-2 (ISO-8859-2)
e325120d 90character set which supports the following languages:
60763153 91 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
59c1ccf2 92 Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower),
e325120d
KH
93 and Swedish.
94We also have specific language environments for the following languages:
95 For Czech, \"Czech\".
eae03b2d 96 For Croatian, \"Croatian\".
a49f9488 97 For Polish, \"Polish\".
e325120d
KH
98 For Romanian, \"Romanian\".
99 For Slovak, \"Slovak\"."))
3617715a
KH
100 '("European"))
101
335a7ad7 102\f
5c4794f3 103;; Latin-3 (ISO-8859-3)
335a7ad7 104
e1915ab3
KH
105(define-coding-system 'iso-latin-3
106 "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."
107 :coding-type 'charset
108 :mnemonic ?3
109 :charset-list '(iso-8859-3)
f15f44a9 110 :mime-charset 'iso-8859-3)
4ed46869 111
71eabd24 112(define-coding-system-alias 'iso-8859-3 'iso-latin-3)
300c450d 113(define-coding-system-alias 'latin-3 'iso-latin-3)
4b9121fc 114
335a7ad7 115(set-language-info-alist
e1915ab3 116 "Latin-3" '((charset iso-8859-3)
3617715a
KH
117 (coding-system iso-latin-3)
118 (coding-priority iso-latin-3)
e1915ab3 119 (nonascii-translation . iso-8859-3)
bed54678 120 (unibyte-display . iso-latin-3)
3e56710f 121 (input-method . "latin-3-prefix")
3617715a 122 (documentation . "\
60763153
RS
123These languages are supported with the Latin-3 (ISO-8859-3) character set:
124 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
3617715a
KH
125 German, Italian, Maltese, Spanish, and Turkish."))
126 '("European"))
127
335a7ad7 128\f
5c4794f3 129;; Latin-4 (ISO-8859-4)
335a7ad7 130
e1915ab3
KH
131(define-coding-system 'iso-latin-4
132 "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."
133 :coding-type 'charset
134 :mnemonic ?4
135 :charset-list '(iso-8859-4)
f15f44a9 136 :mime-charset 'iso-8859-4)
4ed46869 137
71eabd24 138(define-coding-system-alias 'iso-8859-4 'iso-latin-4)
300c450d 139(define-coding-system-alias 'latin-4 'iso-latin-4)
4b9121fc 140
335a7ad7 141(set-language-info-alist
e1915ab3 142 "Latin-4" '((charset iso-8859-4)
3617715a
KH
143 (coding-system iso-8859-4)
144 (coding-priority iso-8859-4)
e1915ab3 145 (nonascii-translation . iso-8859-4)
bed54678 146 (unibyte-display . iso-8859-4)
11f340ed 147 (input-method . "latin-4-postfix")
3617715a 148 (documentation . "\
60763153
RS
149These languages are supported with the Latin-4 (ISO-8859-4) character set:
150 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
3617715a
KH
151 Latvian, Lithuanian, and Norwegian."))
152 '("European"))
153
335a7ad7 154\f
5c4794f3 155;; Latin-5 (ISO-8859-9)
335a7ad7 156
e1915ab3
KH
157(define-coding-system 'iso-latin-5
158 "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."
159 :coding-type 'charset
160 :mnemonic ?9
161 :charset-list '(iso-8859-9)
f15f44a9 162 :mime-charset 'iso-8859-9)
4ed46869 163
71eabd24 164(define-coding-system-alias 'iso-8859-9 'iso-latin-5)
300c450d 165(define-coding-system-alias 'latin-5 'iso-latin-5)
4b9121fc 166
3617715a 167(set-language-info-alist
e1915ab3 168 "Latin-5" '((charset iso-8859-9)
3617715a
KH
169 (coding-system iso-latin-5)
170 (coding-priority iso-latin-5)
e1915ab3 171 (nonascii-translation . iso-8859-9)
bed54678 172 (unibyte-display . iso-latin-5)
11f340ed 173 (input-method . "latin-5-postfix")
a49f9488
DL
174 (documentation . "Support for Latin-5.\
175See also the Turkish environment."))
cce3ba48
DL
176 '("European"))
177
178\f
0859301a
DL
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)
0859301a
DL
196 (unibyte-display . iso-latin-6)
197 ;; Fixme: input method.
198 (documentation . "Support for generic Latin-6 (Northern European)."))
199 '("European"))
200
201\f
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)
0859301a
DL
219 (unibyte-display . iso-latin-7)
220 ;; Fixme: input method.
221 (documentation . "Support for generic Latin-7 (Baltic Rim)."))
222 '("European"))
223\f
cce3ba48
DL
224;; Latin-8 (ISO-8859-14)
225
e1915ab3
KH
226(define-coding-system 'iso-latin-8
227 "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."
228 :coding-type 'charset
229 ;; `W' for `Welsh', since `C' for `Celtic' is taken.
230 :mnemonic ?W
231 :charset-list '(iso-8859-14)
f15f44a9 232 :mime-charset 'iso-8859-14)
cce3ba48
DL
233
234(define-coding-system-alias 'iso-8859-14 'iso-latin-8)
235(define-coding-system-alias 'latin-8 'iso-latin-8)
236
cce3ba48 237(set-language-info-alist
e1915ab3 238 "Latin-8" '((charset iso-8859-14)
cce3ba48
DL
239 (coding-system iso-latin-8)
240 (coding-priority iso-latin-8)
e1915ab3 241 (nonascii-translation . iso-8859-14)
cce3ba48 242 (unibyte-display . iso-latin-8)
27ff18c9
DL
243 (input-method . "latin-8-prefix")
244 ;; Fixme: Welsh/Ga{e}lic greetings
245 (sample-text . "\e,_"\e(B \e,_p\e(B \e,_^\e(B")
cce3ba48
DL
246 (documentation . "\
247This language environment is a generic one for the Latin-8 (ISO-8859-14)
27ff18c9 248character set which supports the Celtic languages, including those not
5ef35063
WL
249covered by other ISO-8859 character sets:
250 Welsh, Manx Gaelic and Irish Gaelic (old orthography)."))
3617715a 251 '("European"))
cce3ba48
DL
252\f
253;; Latin-9 (ISO-8859-15)
254
e1915ab3
KH
255(define-coding-system 'iso-latin-9
256 "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."
257 :coding-type 'charset
258 ;; `0' for `Latin-0'
259 :mnemonic ?0
260 :charset-list '(iso-8859-15)
f15f44a9 261 :mime-charset 'iso-8859-15)
cce3ba48
DL
262
263(define-coding-system-alias 'iso-8859-15 'iso-latin-9)
264(define-coding-system-alias 'latin-9 'iso-latin-9)
265(define-coding-system-alias 'latin-0 'iso-latin-9)
3617715a 266
cce3ba48 267(set-language-info-alist
e1915ab3 268 "Latin-9" '((charset iso-8859-15)
cce3ba48
DL
269 (coding-system iso-latin-9)
270 (coding-priority iso-latin-9)
e1915ab3 271 (nonascii-translation . iso-8859-15)
cce3ba48 272 (unibyte-display . iso-latin-9)
27ff18c9 273 (input-method . "latin-9-prefix")
cce3ba48 274 (sample-text
27ff18c9 275 . "AVE. \e,b&(48<=>\e(B \e,b$\e(B")
cce3ba48
DL
276 (documentation . "\
277This language environment is a generic one for the Latin-9 (ISO-8859-15)
278character set which supports the same languages as Latin-1 with the
279addition of the Euro sign and some additional French and Finnish letters.
280Latin-9 is sometimes nicknamed `Latin-0'."))
281 '("European"))
3617715a 282\f
accf24cd
DL
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
06d5cc88 291(define-coding-system 'windows-1252
accf24cd 292 "windows-1252 (Western European) encoding (MIME: WINDOWS-1252)"
06d5cc88
DL
293 :coding-type 'charset
294 :mnemonic ?*
295 :charset-list '(windows-1252)
296 :mime-charset 'windows-1252)
297(define-coding-system-alias 'cp1252 'windows-1252)
accf24cd
DL
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)
0859301a
DL
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)
6d2186ff
DL
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
24d51014
DL
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
6d2186ff
DL
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)
06d5cc88 385\f
6f3ab39c
FP
386(set-language-info-alist
387 "Dutch" '((tutorial . "TUTORIAL.nl")
8f924df7 388 (charset iso-8859-1)
6f3ab39c
FP
389 (coding-system iso-latin-1 iso-latin-9)
390 (coding-priority iso-latin-1)
8f924df7 391 (nonascii-translation . iso-8859-1)
6f3ab39c
FP
392 (unibyte-display . iso-latin-1)
393 (input-method . "dutch")
394 (sample-text . "Er is een aantal manieren waarop je dit kan doen")
395 (documentation . "\
396This language environment is almost the same as Latin-1,
397but it selects the Dutch tutorial and input method."))
398 '("European"))
399
4ed46869 400(set-language-info-alist
bed54678 401 "German" '((tutorial . "TUTORIAL.de")
e1915ab3 402 (charset iso-8859-1)
edc64f42 403 (coding-system iso-latin-1 iso-latin-9)
3617715a 404 (coding-priority iso-latin-1)
e1915ab3 405 (nonascii-translation . iso-8859-1)
3e56710f 406 (input-method . "german-postfix")
bed54678 407 (unibyte-display . iso-latin-1)
3617715a
KH
408 (sample-text . "\
409German (Deutsch Nord) Guten Tag
410German (Deutsch S\e,A|\e(Bd) Gr\e,A|_\e(B Gott")
411 (documentation . "\
412This language environment is almost the same as Latin-1,
70a4f3ea
WL
413but sets the default input method to \"german-postfix\".
414Additionally, it selects the German tutorial."))
3617715a 415 '("European"))
8dfef503 416
fdd2d14d
EZ
417(set-language-info-alist
418 "French" '((tutorial . "TUTORIAL.fr")
e1915ab3 419 (charset iso-8859-1)
edc64f42 420 (coding-system iso-latin-1 iso-latin-9)
fdd2d14d 421 (coding-priority iso-latin-1)
e1915ab3 422 (nonascii-translation . iso-8859-1)
fdd2d14d
EZ
423 (unibyte-display . iso-latin-1)
424 (input-method . "latin-1-prefix")
425 (sample-text . "French (Fran\e,Ag\e(Bais) Bonjour, Salut")
426 (documentation . "\
427This language environment is almost the same as Latin-1,
b1c0272c 428but it selects the French tutorial and input method."))
fdd2d14d
EZ
429 '("European"))
430
0dcfc7bc
FP
431(set-language-info-alist
432 "Italian" '((tutorial . "TUTORIAL.it")
8f924df7 433 (charset iso-8859-1)
0dcfc7bc
FP
434 (coding-system iso-latin-1 iso-latin-9)
435 (coding-priority iso-latin-1)
8f924df7 436 (nonascii-translation . iso-8859-1)
0dcfc7bc
FP
437 (unibyte-display . iso-latin-1)
438 (input-method . "italian-postfix")
439 (sample-text . "Salve, ciao!")
440 (documentation . "\
441This language environment is almost the same as Latin-1,
442but sets the default input method to \"italian-postfix\".
443Additionally, it selects the Italian tutorial."))
444 '("European"))
445
e0980142 446(set-language-info-alist
e1915ab3 447 "Slovenian" '((charset iso-8859-2)
0fbd0425 448 (coding-system . (iso-8859-2 windows-1250))
e0980142 449 (coding-priority . (iso-8859-2))
e1915ab3 450 (nonascii-translation . iso-8859-2)
57ef7816 451 (input-method . "slovenian")
e0980142
RS
452 (unibyte-display . iso-8859-2)
453 (tutorial . "TUTORIAL.sl")
454 (sample-text . "\e,B.\e(Belimo vam uspe\e,B9\e(Ben dan!")
b1c0272c
FP
455 (documentation . "\
456This language environment is almost the same as Latin-2,
457but it selects the Slovenian tutorial and input method."))
e0980142
RS
458 '("European"))
459
891258f2
GM
460(set-language-info-alist
461 "Spanish" '((tutorial . "TUTORIAL.es")
e1915ab3 462 (charset iso-8859-1)
edc64f42 463 (coding-system iso-latin-1 iso-latin-9)
891258f2
GM
464 (coding-priority iso-latin-1)
465 (input-method . "spanish-postfix")
8f924df7 466 (nonascii-translation . iso-8859-1)
891258f2
GM
467 (unibyte-display . iso-latin-1)
468 (sample-text . "Spanish (Espa\e,Aq\e(Bol) \e,A!\e(BHola!")
469 (documentation . "\
470This language environment is almost the same as Latin-1,
70a4f3ea 471but it sets the default input method to \"spanish-postfix\",
a959e723 472and it selects the Spanish tutorial."))
891258f2
GM
473 '("European"))
474
d22c4fb9
KH
475;; For Turkish, the character set ISO-8859-9 (Latin-5) is used. But,
476;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3)
477;; was used for Turkish. Those who use Latin-3 for Turkish should use
478;; "Latin-3" language environment.
479
480(set-language-info-alist
e1915ab3 481 "Turkish" '((charset iso-8859-9)
0fbd0425 482 (coding-system iso-latin-5 windows-1254 iso-latin-3)
d22c4fb9 483 (coding-priority iso-latin-5)
e1915ab3 484 (nonascii-translation . iso-8859-9)
d22c4fb9
KH
485 (unibyte-display . iso-latin-5)
486 (input-method . "turkish-postfix")
487 (sample-text . "Turkish (T\e,M|\e(Brk\e,Mg\e(Be) Merhaba")
24d51014
DL
488 (setup-function
489 . (lambda ()
490 (set-case-syntax-pair ?I ?\e,C9\e(B (standard-case-table))
491 (set-case-syntax-pair ?\e,C)\e(B ?i (standard-case-table))))
492 (exit-function
493 . (lambda ()
494 (set-case-syntax-pair ?I ?i (standard-case-table))
495 (set-case-syntax ?\e,C9\e(B "w" (standard-case-table))
496 (set-case-syntax ?\e,C)\e(B "w" (standard-case-table))))
497 (documentation . "Support for Turkish.
498Differs from the Latin-5 environment in using the `turkish-postfix' input
499method and applying Turkish case rules for the characters i, I, \e,C9\e(B, \e,C)\e(B.")))
d22c4fb9 500
b9427ca6
KH
501;; Polish ISO 8859-2 environment.
502;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl>
503;; Keywords: multilingual, Polish
504
b9427ca6 505(set-language-info-alist
8f924df7
KH
506 "Polish" '((charset iso-8859-2)
507 (coding-system iso-8859-2 windows-1250)
508 (coding-priority iso-8859-2)
b9427ca6 509 (input-method . "polish-slash")
8f924df7 510 (nonascii-translation . iso-8859-2)
b9427ca6
KH
511 (unibyte-display . iso-8859-2)
512 (tutorial . "TUTORIAL.pl")
2a52f40e 513 (sample-text . "P\e,Bs\e(Bjd\e,B<\e(B, ki\e,Bq\e(B-\e,B?\e(Be t\e,Bj\e(B chmurno\e,B6f\e(B w g\e,B31\e(Bb flaszy")
b9427ca6
KH
514 (documentation . t))
515 '("European"))
516
3286933f
DL
517(set-language-info-alist
518 "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based
519 (coding-priority utf-8 latin-8)
e1915ab3 520 (nonascii-translation . iso-8859-14)
3286933f
DL
521 (input-method . "welsh")
522 (documentation . "Support for Welsh, using Unicode."))
523 '("European"))
524
eae03b2d
DL
525(set-language-info-alist
526 "Latin-6" `((coding-system latin-6)
527 (coding-priority latin-6)
528 (nonascii-translation . ,(get 'decode-iso-latin-6 'translation-table))
bccb30c4 529 (input-method . "latin-prefix")
eae03b2d
DL
530 (features code-pages)
531 (documentation . "Support for Latin-6."))
532 '("European"))
533
3286933f
DL
534(set-language-info-alist
535 "Latin-7" `((coding-system latin-7)
536 (coding-priority latin-7)
e1915ab3 537 (nonascii-translation . iso-8859-13)
bccb30c4 538 (input-method . "latin-prefix")
3286933f
DL
539 (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian."))
540 '("European"))
541
542(set-language-info-alist
0fbd0425 543 "Lithuanian" `((coding-system latin-7 windows-1257)
3286933f 544 (coding-priority latin-7)
e1915ab3 545 (nonascii-translation . iso-8859-13)
3286933f 546 (input-method . "lithuanian-keyboard")
3286933f
DL
547 (documentation . "Support for Lithuanian."))
548 '("European"))
549
550(set-language-info-alist
0fbd0425 551 "Latvian" `((coding-system latin-7 windows-1257)
3286933f 552 (coding-priority latin-7)
e1915ab3 553 (nonascii-translation . iso-8859-13)
3286933f 554 (input-method . "latvian-keyboard")
3286933f
DL
555 (documentation . "Support for Latvian."))
556 '("European"))
adc7d9cd
RS
557
558(set-language-info-alist
88ee27e5 559 "Swedish" '((tutorial . "TUTORIAL.sv")
8f924df7 560 (charset iso-8859-1)
adc7d9cd
RS
561 (coding-system iso-latin-1)
562 (coding-priority iso-latin-1)
8f924df7 563 (nonascii-translation . iso-8859-1)
adc7d9cd
RS
564 (unibyte-display . iso-latin-1)
565 (sample-text . "Goddag Hej")
566 (documentation . "Support for Swedish"))
567 '("European"))
eae03b2d
DL
568
569(set-language-info-alist
8f924df7
KH
570 "Croatian" '((charset iso-8859-2)
571 (coding-system iso-8859-2)
572 (coding-priority iso-8859-2)
eae03b2d 573 (input-method . "croatian")
8f924df7 574 (nonascii-translation . iso-8859-2)
eae03b2d
DL
575 (unibyte-display . iso-8859-2)
576 (documentation . "Support for Croatian with Latin-2 encoding."))
577 '("European"))
8f924df7 578
71070f12 579\f
e1915ab3
KH
580(define-coding-system 'mac-roman
581 "Mac Roman Encoding (MIME:MACINTOSH)."
582 :coding-type 'charset
583 :mnemonic ?M
584 :charset-list '(mac-roman)
e1915ab3 585 :mime-charset 'macintosh)
71070f12 586
accf24cd
DL
587(define-coding-system 'next
588 "NeXTstep encoding"
589 :coding-type 'charset
590 :mnemonic ?*
591 :charset-list '(next)
592 :mime-charset 'next)
0859301a
DL
593
594(define-coding-system 'hp-roman8
595 "Hewlet-Packard roman-8 encoding (MIME:ROMAN-8)"
596 :coding-type 'charset
597 :mnemonic ?*
598 :charset-list '(hp-roman8)
599 :mime-charset 'hp-roman8)
600(define-coding-system-alias 'roman8 'hp-roman8)
601
602(define-coding-system 'adobe-standard-encoding
603 "Adobe `standard' encoding for PostScript"
604 :coding-type 'charset
605 :mnemonic ?*
76429b9a
DL
606 :charset-list '(adobe-standard-encoding)
607 :mime-charset 'adobe-standard-encoding)
fc22b4eb 608
71070f12 609\f
fc22b4eb
KH
610;; For automatic composing of diacritics and combining marks.
611(dolist (range '( ;; combining diacritical marks
612 (#x0300 #x0314 (tc . bc))
613 (#x0315 (tr . bl))
614 (#x0316 #x0319 (bc . tc))
615 (#x031A (tr . cl))
616 (#x031B #x0320 (bc . tc))
617 (#x0321 (Br . tr))
618 (#x0322 (Br . tl))
619 (#x0323 #x0333 (bc . tc))
620 (#x0334 #x0338 (Bc . Bc))
621 (#x0339 #x033C (bc . tc))
622 (#x033D #x033F (tc . bc))
623 (#x0340 (tl . bc))
624 (#x0341 (tr . bc))
625 (#x0342 #x0344 (tc . bc))
626 (#x0345 (bc . tc))
627 (#x0346 (tc . bc))
628 (#x0347 #x0349 (bc . tc))
629 (#x034A #x034C (tc . bc))
630 (#x034D #x034E (bc . tc))
631 ;; combining diacritical marks for symbols
632 (#x20D0 #x20D1 (tc . bc))
633 (#x20D2 #x20D3 (Bc . Bc))
634 (#x20D4 #x20D7 (tc . bc))
635 (#x20D8 #x20DA (Bc . Bc))
636 (#x20DB #x20DC (tc . bc))
637 (#x20DD #x20E0 (Bc . Bc))
638 (#x20E1 (tc . bc))
639 (#x20E2 #x20E3 (Bc . Bc))))
640 (let* ((from (car range))
641 (to (if (= (length range) 3)
642 (nth 1 range)
643 from))
644 (composition (car (last range))))
645 (while (<= from to)
646 (put-char-code-property from 'diacritic-composition composition)
647 (aset composition-function-table from 'diacritic-composition-function)
648 (setq from (1+ from)))))
71070f12 649
5180cc01
DL
650(defconst diacritic-composition-pattern "\\C^\\c^+")
651
5180cc01
DL
652(defun diacritic-compose-region (beg end)
653 "Compose diacritic characters in the region.
654When called from a program, expects two arguments,
655positions (integers or markers) specifying the region."
656 (interactive "r")
657 (save-restriction
658 (narrow-to-region beg end)
659 (goto-char (point-min))
660 (while (re-search-forward diacritic-composition-pattern nil t)
661 (compose-region (match-beginning 0) (match-end 0)))))
662
5180cc01
DL
663(defun diacritic-compose-string (string)
664 "Compose diacritic characters in STRING and return the resulting string."
665 (let ((idx 0))
666 (while (setq idx (string-match diacritic-composition-pattern string idx))
667 (compose-string string idx (match-end 0))
668 (setq idx (match-end 0))))
669 string)
a1506d29 670
5180cc01
DL
671(defun diacritic-compose-buffer ()
672 "Compose diacritic characters in the current buffer."
673 (interactive)
674 (diacritic-compose-region (point-min) (point-max)))
675
5180cc01
DL
676(defun diacritic-post-read-conversion (len)
677 (diacritic-compose-region (point) (+ (point) len))
678 len)
679
fc22b4eb
KH
680(defun diacritic-composition-function (pos &optional string)
681 "Compose diacritic text around POS.
682Optional 2nd argument STRING, if non-nil, is a string containing text
5180cc01
DL
683to compose.
684
fc22b4eb
KH
685The return value is the end position of composed characters,
686or nil if no characters are composed."
687 (setq pos (1- pos))
688 (if string
689 (let ((ch (aref string pos))
690 start end components ch composition)
691 (when (and (>= pos 0)
692 ;; Previous character is latin.
693 (aref (char-category-set ch) ?l)
694 (/= ch 32))
695 (setq start pos
696 end (length string)
697 components (list ch)
698 pos (1+ pos))
699 (while (and
700 (< pos end)
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))))
5180cc01 726
27ff18c9
DL
727(provide 'european)
728
4ed46869 729;;; european.el ends here