Commit | Line | Data |
---|---|---|
e8af40ee | 1 | ;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*- |
4ed46869 | 2 | |
eaa61218 KH |
3 | ;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004 |
4 | ;; Free Software Foundation, Inc. | |
5 | ;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003 | |
6 | ;; National Institute of Advanced Industrial Science and Technology (AIST) | |
7 | ;; Registration Number H14PRO021 | |
4ed46869 KH |
8 | |
9 | ;; Keywords: multilingual, European | |
10 | ||
11 | ;; This file is part of GNU Emacs. | |
12 | ||
13 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
14 | ;; it under the terms of the GNU General Public License as published by | |
15 | ;; the Free Software Foundation; either version 2, or (at your option) | |
16 | ;; any later version. | |
17 | ||
18 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
19 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;; GNU General Public License for more details. | |
22 | ||
23 | ;; You should have received a copy of the GNU General Public License | |
369314dc KH |
24 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
25 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
26 | ;; Boston, MA 02111-1307, USA. | |
4ed46869 KH |
27 | |
28 | ;;; Commentary: | |
29 | ||
b978d1a3 DL |
30 | ;; For European scripts, all the ISO Latin character sets are |
31 | ;; supported, along with various others. | |
4ed46869 KH |
32 | |
33 | ;;; Code: | |
34 | ||
5c4794f3 | 35 | ;; Latin-1 (ISO-8859-1) |
335a7ad7 | 36 | |
335a7ad7 | 37 | (set-language-info-alist |
bed54678 | 38 | "Latin-1" '((charset ascii latin-iso8859-1) |
3617715a KH |
39 | (coding-system iso-latin-1) |
40 | (coding-priority iso-latin-1) | |
bed54678 | 41 | (nonascii-translation . latin-iso8859-1) |
16b2eb50 | 42 | (unibyte-syntax . "latin-1") |
bed54678 | 43 | (unibyte-display . iso-latin-1) |
3e56710f | 44 | (input-method . "latin-1-prefix") |
5c4794f3 RS |
45 | (sample-text |
46 | . "Hello, Hej, Tere, Hei, Bonjour, Gr\e,A|_\e(B Gott, Ciao, \e,A!\e(BHola!") | |
3617715a | 47 | (documentation . "\ |
cce3ba48 DL |
48 | This language environment is a generic one for the Latin-1 (ISO-8859-1) |
49 | character set which supports the following European languages: | |
50 | Albanian, Basque, Breton, Catalan, Danish, Dutch, English, Faeroese, | |
51 | Finnish, French (with restrictions -- see Latin-9), Frisian, Galician, | |
52 | German, Greenlandic, Icelandic, Irish Gaelic (new orthography), | |
53 | Italian, Latin, Luxemburgish, Norwegian, Portuguese, Rhaeto-Romanic, | |
54 | Scottish Gaelic, Spanish, and Swedish. | |
cd53f29e KH |
55 | We also have specific language environments for the following languages: |
56 | For Dutch, \"Dutch\". | |
57 | For German, \"German\". | |
cc01e274 | 58 | For French, \"French\". |
6f3ab39c FP |
59 | For Italian, \"Italian\". |
60 | For Slovenian, \"Slovenian\". | |
61 | For Spanish, \"Spanish\". | |
cce3ba48 DL |
62 | |
63 | Latin-1 also covers several written languages outside Europe, including | |
64 | Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans.")) | |
3617715a KH |
65 | '("European")) |
66 | ||
b978d1a3 DL |
67 | (eval-and-compile |
68 | (setq | |
69 | non-iso-charset-alist | |
70 | (cp-make-coding-system | |
71 | windows-1252 | |
7453c3ac KH |
72 | [?\\e$,1tL\e(B nil ?\\e$,1rz\e(B ?\\e$,1!R\e(B ?\\e$,1r~\e(B ?\\e$,1s&\e(B ?\\e$,1s \e(B ?\\e$,1s!\e(B ?\\e$,1$f\e(B ?\\e$,1s0\e(B ?\\e$,1! \e(B ?\\e$,1s9\e(B ?\\e$,1 r\e(B nil ?\\e$,1!=\e(B nil nil |
73 | ?\\e$,1rx\e(B ?\\e$,1ry\e(B ?\\e$,1r|\e(B ?\\e$,1r}\e(B ?\\e$,1s"\e(B ?\\e$,1rs\e(B ?\\e$,1rt\e(B ?\\e$,1$|\e(B ?\\e$,1ub\e(B ?\\e$,1!!\e(B ?\\e$,1s:\e(B ?\\e$,1 s\e(B nil ?\\e$,1!>\e(B ?\\e$,1!8\e(B ?\\e,A \e(B ?\\e,A!\e(B | |
b978d1a3 DL |
74 | ?\\e,A"\e(B ?\\e,A#\e(B ?\\e,A$\e(B ?\\e,A%\e(B ?\\e,A&\e(B ?\\e,A'\e(B ?\\e,A(\e(B ?\\e,A)\e(B ?\\e,A*\e(B ?\\e,A+\e(B ?\\e,A,\e(B ?\\e,A-\e(B ?\\e,A.\e(B ?\\e,A/\e(B ?\\e,A0\e(B ?\\e,A1\e(B ?\\e,A2\e(B |
75 | ?\\e,A3\e(B ?\\e,A4\e(B ?\\e,A5\e(B ?\\e,A6\e(B ?\\e,A7\e(B ?\\e,A8\e(B ?\\e,A9\e(B ?\\e,A:\e(B ?\\e,A;\e(B ?\\e,A<\e(B ?\\e,A=\e(B ?\\e,A>\e(B ?\\e,A?\e(B ?\\e,A@\e(B ?\\e,AA\e(B ?\\e,AB\e(B ?\\e,AC\e(B | |
76 | ?\\e,AD\e(B ?\\e,AE\e(B ?\\e,AF\e(B ?\\e,AG\e(B ?\\e,AH\e(B ?\\e,AI\e(B ?\\e,AJ\e(B ?\\e,AK\e(B ?\\e,AL\e(B ?\\e,AM\e(B ?\\e,AN\e(B ?\\e,AO\e(B ?\\e,AP\e(B ?\\e,AQ\e(B ?\\e,AR\e(B ?\\e,AS\e(B ?\\e,AT\e(B | |
77 | ?\\e,AU\e(B ?\\e,AV\e(B ?\\e,AW\e(B ?\\e,AX\e(B ?\\e,AY\e(B ?\\e,AZ\e(B ?\\e,A[\e(B ?\\e,A\\e(B ?\\e,A]\e(B ?\\e,A^\e(B ?\\e,A_\e(B ?\\e,A`\e(B ?\\e,Aa\e(B ?\\e,Ab\e(B ?\\e,Ac\e(B ?\\e,Ad\e(B ?\\e,Ae\e(B | |
78 | ?\\e,Af\e(B ?\\e,Ag\e(B ?\\e,Ah\e(B ?\\e,Ai\e(B ?\\e,Aj\e(B ?\\e,Ak\e(B ?\\e,Al\e(B ?\\e,Am\e(B ?\\e,An\e(B ?\\e,Ao\e(B ?\\e,Ap\e(B ?\\e,Aq\e(B ?\\e,Ar\e(B ?\\e,As\e(B ?\\e,At\e(B ?\\e,Au\e(B ?\\e,Av\e(B | |
79 | ?\\e,Aw\e(B ?\\e,Ax\e(B ?\\e,Ay\e(B ?\\e,Az\e(B ?\\e,A{\e(B ?\\e,A|\e(B ?\\e,A}\e(B ?\\e,A~\e(B ?\\e,A\7f\e(B]))) | |
335a7ad7 | 80 | \f |
5c4794f3 | 81 | ;; Latin-2 (ISO-8859-2) |
335a7ad7 | 82 | |
4ed46869 | 83 | (make-coding-system |
4b9121fc | 84 | 'iso-latin-2 2 ?2 |
5ef35063 | 85 | "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)." |
3617715a | 86 | '(ascii latin-iso8859-2 nil nil |
c25713f1 | 87 | nil nil nil nil nil nil nil nil nil nil nil t) |
3617715a KH |
88 | '((safe-charsets ascii latin-iso8859-2) |
89 | (mime-charset . iso-8859-2))) | |
4ed46869 | 90 | |
71eabd24 | 91 | (define-coding-system-alias 'iso-8859-2 'iso-latin-2) |
300c450d | 92 | (define-coding-system-alias 'latin-2 'iso-latin-2) |
4b9121fc | 93 | |
335a7ad7 | 94 | (set-language-info-alist |
bed54678 | 95 | "Latin-2" '((charset ascii latin-iso8859-2) |
3617715a KH |
96 | (coding-system iso-latin-2) |
97 | (coding-priority iso-latin-2) | |
bed54678 | 98 | (nonascii-translation . latin-iso8859-2) |
16b2eb50 | 99 | (unibyte-syntax . "latin-2") |
bed54678 | 100 | (unibyte-display . iso-latin-2) |
3e56710f | 101 | (input-method . "latin-2-prefix") |
3617715a | 102 | (documentation . "\ |
cce3ba48 | 103 | This language environment is a generic one for the Latin-2 (ISO-8859-2) |
e325120d | 104 | character set which supports the following languages: |
60763153 | 105 | Albanian, Czech, English, German, Hungarian, Polish, Romanian, |
59c1ccf2 | 106 | Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower), |
e325120d KH |
107 | and Swedish. |
108 | We also have specific language environments for the following languages: | |
109 | For Czech, \"Czech\". | |
eae03b2d | 110 | For Croatian, \"Croatian\". |
e325120d KH |
111 | For Romanian, \"Romanian\". |
112 | For Slovak, \"Slovak\".")) | |
3617715a KH |
113 | '("European")) |
114 | ||
335a7ad7 | 115 | \f |
5c4794f3 | 116 | ;; Latin-3 (ISO-8859-3) |
335a7ad7 | 117 | |
4ed46869 | 118 | (make-coding-system |
4b9121fc | 119 | 'iso-latin-3 2 ?3 |
5ef35063 | 120 | "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)." |
3617715a | 121 | '(ascii latin-iso8859-3 nil nil |
c25713f1 | 122 | nil nil nil nil nil nil nil nil nil nil nil t) |
3617715a KH |
123 | '((safe-charsets ascii latin-iso8859-3) |
124 | (mime-charset . iso-8859-3))) | |
4ed46869 | 125 | |
71eabd24 | 126 | (define-coding-system-alias 'iso-8859-3 'iso-latin-3) |
300c450d | 127 | (define-coding-system-alias 'latin-3 'iso-latin-3) |
4b9121fc | 128 | |
335a7ad7 | 129 | (set-language-info-alist |
bed54678 | 130 | "Latin-3" '((charset ascii latin-iso8859-3) |
3617715a KH |
131 | (coding-system iso-latin-3) |
132 | (coding-priority iso-latin-3) | |
bed54678 | 133 | (nonascii-translation . latin-iso8859-3) |
16b2eb50 | 134 | (unibyte-syntax . "latin-3") |
bed54678 | 135 | (unibyte-display . iso-latin-3) |
3e56710f | 136 | (input-method . "latin-3-prefix") |
3617715a | 137 | (documentation . "\ |
60763153 RS |
138 | These languages are supported with the Latin-3 (ISO-8859-3) character set: |
139 | Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician, | |
3617715a KH |
140 | German, Italian, Maltese, Spanish, and Turkish.")) |
141 | '("European")) | |
142 | ||
335a7ad7 | 143 | \f |
5c4794f3 | 144 | ;; Latin-4 (ISO-8859-4) |
335a7ad7 | 145 | |
4ed46869 | 146 | (make-coding-system |
4b9121fc | 147 | 'iso-latin-4 2 ?4 |
5ef35063 | 148 | "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)." |
3617715a | 149 | '(ascii latin-iso8859-4 nil nil |
c25713f1 | 150 | nil nil nil nil nil nil nil nil nil nil nil t) |
3617715a | 151 | '((safe-charsets ascii latin-iso8859-4) |
8585266f | 152 | (mime-charset . iso-8859-4))) |
4ed46869 | 153 | |
71eabd24 | 154 | (define-coding-system-alias 'iso-8859-4 'iso-latin-4) |
300c450d | 155 | (define-coding-system-alias 'latin-4 'iso-latin-4) |
4b9121fc | 156 | |
335a7ad7 | 157 | (set-language-info-alist |
bed54678 | 158 | "Latin-4" '((charset ascii latin-iso8859-4) |
3617715a KH |
159 | (coding-system iso-8859-4) |
160 | (coding-priority iso-8859-4) | |
bed54678 | 161 | (nonascii-translation . latin-iso8859-4) |
16b2eb50 | 162 | (unibyte-syntax . "latin-4") |
bed54678 | 163 | (unibyte-display . iso-8859-4) |
11f340ed | 164 | (input-method . "latin-4-postfix") |
3617715a | 165 | (documentation . "\ |
60763153 RS |
166 | These languages are supported with the Latin-4 (ISO-8859-4) character set: |
167 | Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, | |
3617715a KH |
168 | Latvian, Lithuanian, and Norwegian.")) |
169 | '("European")) | |
170 | ||
335a7ad7 | 171 | \f |
5c4794f3 | 172 | ;; Latin-5 (ISO-8859-9) |
335a7ad7 | 173 | |
4ed46869 | 174 | (make-coding-system |
4b9121fc | 175 | 'iso-latin-5 2 ?9 |
5ef35063 | 176 | "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)." |
3617715a | 177 | '(ascii latin-iso8859-9 nil nil |
c25713f1 | 178 | nil nil nil nil nil nil nil nil nil nil nil t) |
3617715a KH |
179 | '((safe-charsets ascii latin-iso8859-9) |
180 | (mime-charset . iso-8859-9))) | |
4ed46869 | 181 | |
71eabd24 | 182 | (define-coding-system-alias 'iso-8859-9 'iso-latin-5) |
300c450d | 183 | (define-coding-system-alias 'latin-5 'iso-latin-5) |
4b9121fc | 184 | |
3617715a | 185 | (set-language-info-alist |
bed54678 | 186 | "Latin-5" '((charset ascii latin-iso8859-9) |
3617715a KH |
187 | (coding-system iso-latin-5) |
188 | (coding-priority iso-latin-5) | |
bed54678 | 189 | (nonascii-translation . latin-iso8859-9) |
16b2eb50 | 190 | (unibyte-syntax . "latin-5") |
bed54678 | 191 | (unibyte-display . iso-latin-5) |
11f340ed | 192 | (input-method . "latin-5-postfix") |
b24cd22e | 193 | (documentation . "Support for Turkish language.")) |
cce3ba48 DL |
194 | '("European")) |
195 | ||
196 | \f | |
197 | ;; Latin-8 (ISO-8859-14) | |
198 | ||
199 | (make-coding-system | |
200 | 'iso-latin-8 2 ?W ; `W' for `Welsh', since `C' | |
201 | ; for `Celtic' is taken. | |
5ef35063 | 202 | "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)." |
cce3ba48 | 203 | '(ascii latin-iso8859-14 nil nil |
c25713f1 | 204 | nil nil nil nil nil nil nil nil nil nil nil t t) |
cce3ba48 DL |
205 | '((safe-charsets ascii latin-iso8859-14) |
206 | (mime-charset . iso-8859-14))) | |
207 | ||
208 | (define-coding-system-alias 'iso-8859-14 'iso-latin-8) | |
209 | (define-coding-system-alias 'latin-8 'iso-latin-8) | |
210 | ||
cce3ba48 DL |
211 | (set-language-info-alist |
212 | "Latin-8" '((charset ascii latin-iso8859-14) | |
213 | (coding-system iso-latin-8) | |
214 | (coding-priority iso-latin-8) | |
215 | (nonascii-translation . latin-iso8859-14) | |
216 | (unibyte-syntax . "latin-8") | |
217 | (unibyte-display . iso-latin-8) | |
27ff18c9 DL |
218 | (input-method . "latin-8-prefix") |
219 | ;; Fixme: Welsh/Ga{e}lic greetings | |
220 | (sample-text . "\e,_"\e(B \e,_p\e(B \e,_^\e(B") | |
cce3ba48 DL |
221 | (documentation . "\ |
222 | This language environment is a generic one for the Latin-8 (ISO-8859-14) | |
27ff18c9 | 223 | character set which supports the Celtic languages, including those not |
5ef35063 WL |
224 | covered by other ISO-8859 character sets: |
225 | Welsh, Manx Gaelic and Irish Gaelic (old orthography).")) | |
3617715a | 226 | '("European")) |
cce3ba48 DL |
227 | \f |
228 | ;; Latin-9 (ISO-8859-15) | |
229 | ||
230 | (make-coding-system | |
231 | 'iso-latin-9 2 ?0 ; `0' for `Latin-0' | |
5ef35063 | 232 | "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)." |
cce3ba48 | 233 | '(ascii latin-iso8859-15 nil nil |
c25713f1 | 234 | nil nil nil nil nil nil nil nil nil nil nil t t) |
cce3ba48 DL |
235 | '((safe-charsets ascii latin-iso8859-15) |
236 | (mime-charset . iso-8859-15))) | |
237 | ||
238 | (define-coding-system-alias 'iso-8859-15 'iso-latin-9) | |
239 | (define-coding-system-alias 'latin-9 'iso-latin-9) | |
240 | (define-coding-system-alias 'latin-0 'iso-latin-9) | |
3617715a | 241 | |
cce3ba48 DL |
242 | (set-language-info-alist |
243 | "Latin-9" '((charset ascii latin-iso8859-15) | |
244 | (coding-system iso-latin-9) | |
245 | (coding-priority iso-latin-9) | |
246 | (nonascii-translation . latin-iso8859-15) | |
247 | (unibyte-syntax . "latin-9") | |
248 | (unibyte-display . iso-latin-9) | |
27ff18c9 | 249 | (input-method . "latin-9-prefix") |
cce3ba48 | 250 | (sample-text |
27ff18c9 | 251 | . "AVE. \e,b&(48<=>\e(B \e,b$\e(B") |
cce3ba48 DL |
252 | (documentation . "\ |
253 | This language environment is a generic one for the Latin-9 (ISO-8859-15) | |
254 | character set which supports the same languages as Latin-1 with the | |
255 | addition of the Euro sign and some additional French and Finnish letters. | |
256 | Latin-9 is sometimes nicknamed `Latin-0'.")) | |
257 | '("European")) | |
3617715a | 258 | \f |
6f3ab39c FP |
259 | (set-language-info-alist |
260 | "Dutch" '((tutorial . "TUTORIAL.nl") | |
261 | (charset ascii latin-iso8859-1) | |
262 | (coding-system iso-latin-1 iso-latin-9) | |
263 | (coding-priority iso-latin-1) | |
264 | (nonascii-translation . latin-iso8859-1) | |
265 | (unibyte-syntax . "latin-1") | |
266 | (unibyte-display . iso-latin-1) | |
267 | (input-method . "dutch") | |
268 | (sample-text . "Er is een aantal manieren waarop je dit kan doen") | |
269 | (documentation . "\ | |
270 | This language environment is almost the same as Latin-1, | |
271 | but it selects the Dutch tutorial and input method.")) | |
272 | '("European")) | |
273 | ||
4ed46869 | 274 | (set-language-info-alist |
bed54678 | 275 | "German" '((tutorial . "TUTORIAL.de") |
3617715a | 276 | (charset ascii latin-iso8859-1) |
edc64f42 | 277 | (coding-system iso-latin-1 iso-latin-9) |
3617715a | 278 | (coding-priority iso-latin-1) |
3e56710f | 279 | (input-method . "german-postfix") |
eae03b2d | 280 | (nonascii-translation . latin-iso8859-1) |
16b2eb50 | 281 | (unibyte-syntax . "latin-1") |
bed54678 | 282 | (unibyte-display . iso-latin-1) |
3617715a KH |
283 | (sample-text . "\ |
284 | German (Deutsch Nord) Guten Tag | |
285 | German (Deutsch S\e,A|\e(Bd) Gr\e,A|_\e(B Gott") | |
286 | (documentation . "\ | |
287 | This language environment is almost the same as Latin-1, | |
70a4f3ea WL |
288 | but sets the default input method to \"german-postfix\". |
289 | Additionally, it selects the German tutorial.")) | |
3617715a | 290 | '("European")) |
8dfef503 | 291 | |
fdd2d14d EZ |
292 | (set-language-info-alist |
293 | "French" '((tutorial . "TUTORIAL.fr") | |
294 | (charset ascii latin-iso8859-1) | |
edc64f42 | 295 | (coding-system iso-latin-1 iso-latin-9) |
fdd2d14d EZ |
296 | (coding-priority iso-latin-1) |
297 | (nonascii-translation . latin-iso8859-1) | |
298 | (unibyte-syntax . "latin-1") | |
299 | (unibyte-display . iso-latin-1) | |
300 | (input-method . "latin-1-prefix") | |
301 | (sample-text . "French (Fran\e,Ag\e(Bais) Bonjour, Salut") | |
302 | (documentation . "\ | |
303 | This language environment is almost the same as Latin-1, | |
b1c0272c | 304 | but it selects the French tutorial and input method.")) |
fdd2d14d EZ |
305 | '("European")) |
306 | ||
0dcfc7bc FP |
307 | (set-language-info-alist |
308 | "Italian" '((tutorial . "TUTORIAL.it") | |
309 | (charset ascii latin-iso8859-1) | |
310 | (coding-system iso-latin-1 iso-latin-9) | |
311 | (coding-priority iso-latin-1) | |
312 | (nonascii-translation . latin-iso8859-1) | |
313 | (unibyte-syntax . "latin-1") | |
314 | (unibyte-display . iso-latin-1) | |
315 | (input-method . "italian-postfix") | |
316 | (sample-text . "Salve, ciao!") | |
317 | (documentation . "\ | |
318 | This language environment is almost the same as Latin-1, | |
319 | but sets the default input method to \"italian-postfix\". | |
320 | Additionally, it selects the Italian tutorial.")) | |
321 | '("European")) | |
322 | ||
e0980142 RS |
323 | (set-language-info-alist |
324 | "Slovenian" '((charset . (ascii latin-iso8859-2)) | |
325 | (coding-system . (iso-8859-2)) | |
326 | (coding-priority . (iso-8859-2)) | |
327 | (nonascii-translation . latin-iso8859-2) | |
57ef7816 | 328 | (input-method . "slovenian") |
e0980142 RS |
329 | (unibyte-syntax . "latin-2") |
330 | (unibyte-display . iso-8859-2) | |
331 | (tutorial . "TUTORIAL.sl") | |
332 | (sample-text . "\e,B.\e(Belimo vam uspe\e,B9\e(Ben dan!") | |
b1c0272c FP |
333 | (documentation . "\ |
334 | This language environment is almost the same as Latin-2, | |
335 | but it selects the Slovenian tutorial and input method.")) | |
e0980142 RS |
336 | '("European")) |
337 | ||
891258f2 GM |
338 | (set-language-info-alist |
339 | "Spanish" '((tutorial . "TUTORIAL.es") | |
340 | (charset ascii latin-iso8859-1) | |
edc64f42 | 341 | (coding-system iso-latin-1 iso-latin-9) |
891258f2 GM |
342 | (coding-priority iso-latin-1) |
343 | (input-method . "spanish-postfix") | |
eae03b2d | 344 | (nonascii-translation . latin-iso8859-1) |
891258f2 GM |
345 | (unibyte-syntax . "latin-1") |
346 | (unibyte-display . iso-latin-1) | |
347 | (sample-text . "Spanish (Espa\e,Aq\e(Bol) \e,A!\e(BHola!") | |
348 | (documentation . "\ | |
349 | This language environment is almost the same as Latin-1, | |
70a4f3ea | 350 | but it sets the default input method to \"spanish-postfix\", |
a959e723 | 351 | and it selects the Spanish tutorial.")) |
891258f2 GM |
352 | '("European")) |
353 | ||
d22c4fb9 KH |
354 | ;; For Turkish, the character set ISO-8859-9 (Latin-5) is used. But, |
355 | ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3) | |
356 | ;; was used for Turkish. Those who use Latin-3 for Turkish should use | |
357 | ;; "Latin-3" language environment. | |
358 | ||
359 | (set-language-info-alist | |
360 | "Turkish" '((charset ascii latin-iso8859-9) | |
edc64f42 | 361 | (coding-system iso-latin-5 iso-latin-3) |
d22c4fb9 KH |
362 | (coding-priority iso-latin-5) |
363 | (nonascii-translation . latin-iso8859-9) | |
364 | (unibyte-syntax . "latin-5") | |
365 | (unibyte-display . iso-latin-5) | |
366 | (input-method . "turkish-postfix") | |
367 | (sample-text . "Turkish (T\e,M|\e(Brk\e,Mg\e(Be) Merhaba") | |
368 | (documentation . t))) | |
369 | ||
b9427ca6 KH |
370 | ;; Polish ISO 8859-2 environment. |
371 | ;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl> | |
372 | ;; Keywords: multilingual, Polish | |
373 | ||
b9427ca6 KH |
374 | (set-language-info-alist |
375 | "Polish" '((charset . (ascii latin-iso8859-2)) | |
376 | (coding-system . (iso-8859-2)) | |
377 | (coding-priority . (iso-8859-2)) | |
378 | (input-method . "polish-slash") | |
379 | (nonascii-translation . latin-iso8859-2) | |
380 | (unibyte-syntax . "latin-2") | |
381 | (unibyte-display . iso-8859-2) | |
382 | (tutorial . "TUTORIAL.pl") | |
2a52f40e | 383 | (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 |
384 | (documentation . t)) |
385 | '("European")) | |
386 | ||
3286933f DL |
387 | (set-language-info-alist |
388 | "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based | |
389 | (coding-priority utf-8 latin-8) | |
eae03b2d | 390 | (nonascii-translation . latin-iso8859-14) |
3286933f DL |
391 | (input-method . "welsh") |
392 | (documentation . "Support for Welsh, using Unicode.")) | |
393 | '("European")) | |
394 | ||
eae03b2d DL |
395 | (set-language-info-alist |
396 | "Latin-6" `((coding-system latin-6) | |
397 | (coding-priority latin-6) | |
398 | (nonascii-translation . ,(get 'decode-iso-latin-6 'translation-table)) | |
bccb30c4 | 399 | (input-method . "latin-prefix") |
eae03b2d DL |
400 | (features code-pages) |
401 | (documentation . "Support for Latin-6.")) | |
402 | '("European")) | |
403 | ||
3286933f DL |
404 | (set-language-info-alist |
405 | "Latin-7" `((coding-system latin-7) | |
406 | (coding-priority latin-7) | |
eae03b2d DL |
407 | (nonascii-translation . ,(get 'decode-iso-latin-7 |
408 | 'translation-table)) | |
bccb30c4 | 409 | (input-method . "latin-prefix") |
3286933f DL |
410 | (features code-pages) |
411 | (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian.")) | |
412 | '("European")) | |
413 | ||
414 | (set-language-info-alist | |
415 | "Lithuanian" `((coding-system latin-7) | |
416 | (coding-priority latin-7) | |
417 | (input-method . "lithuanian-keyboard") | |
eae03b2d DL |
418 | (nonascii-translation . ,(get 'decode-iso-latin-7 |
419 | 'translation-table)) | |
3286933f DL |
420 | (features code-pages) |
421 | (documentation . "Support for Lithuanian.")) | |
422 | '("European")) | |
423 | ||
424 | (set-language-info-alist | |
425 | "Latvian" `((coding-system latin-7) | |
426 | (coding-priority latin-7) | |
427 | (input-method . "latvian-keyboard") | |
eae03b2d DL |
428 | (nonascii-translation . ,(get 'decode-iso-latin-7 |
429 | 'translation-table)) | |
3286933f DL |
430 | (features code-pages) |
431 | (documentation . "Support for Latvian.")) | |
432 | '("European")) | |
adc7d9cd RS |
433 | |
434 | (set-language-info-alist | |
88ee27e5 | 435 | "Swedish" '((tutorial . "TUTORIAL.sv") |
adc7d9cd RS |
436 | (charset ascii latin-iso8859-1) |
437 | (coding-system iso-latin-1) | |
438 | (coding-priority iso-latin-1) | |
eae03b2d | 439 | (nonascii-translation . latin-iso8859-1) |
adc7d9cd RS |
440 | (unibyte-syntax . "latin-1") |
441 | (unibyte-display . iso-latin-1) | |
442 | (sample-text . "Goddag Hej") | |
443 | (documentation . "Support for Swedish")) | |
444 | '("European")) | |
eae03b2d DL |
445 | |
446 | (set-language-info-alist | |
447 | "Croatian" '((charset . (ascii latin-iso8859-2)) | |
448 | (coding-system . (iso-8859-2)) | |
449 | (coding-priority . (iso-8859-2)) | |
450 | (input-method . "croatian") | |
451 | (nonascii-translation . latin-iso8859-2) | |
452 | (unibyte-syntax . "latin-2") | |
453 | (unibyte-display . iso-8859-2) | |
454 | (documentation . "Support for Croatian with Latin-2 encoding.")) | |
455 | '("European")) | |
c7a73294 DK |
456 | |
457 | (set-language-info-alist | |
458 | "Brazilian Portuguese" '((tutorial . "TUTORIAL.pt_BR") | |
459 | (charset ascii latin-iso8859-1) | |
460 | (coding-system iso-latin-1 iso-latin-9) | |
461 | (coding-priority iso-latin-1) | |
462 | (nonascii-translation . latin-iso8859-1) | |
463 | (unibyte-syntax . "latin-1") | |
464 | (unibyte-display . iso-latin-1) | |
465 | (input-method . "latin-1-prefix") | |
466 | (sample-text . "Oi") | |
467 | (documentation . "Support for Brazilian Portuguese.")) | |
468 | '("European")) | |
71070f12 KH |
469 | \f |
470 | ;; Definitions for the Mac Roman character sets and coding system. | |
471 | ;; The Mac Roman encoding uses all 128 code points in the range 128 to | |
a75f7176 | 472 | ;; 255 for actual characters. Emacs decodes them to one of the |
71070f12 KH |
473 | ;; following character sets. |
474 | ;; ascii, latin-iso8859-1, mule-unicode-0100-24ff, | |
475 | ;; mule-unicode-2500-33ff, mule-unicode-e000-ffff | |
476 | ||
477 | (let | |
478 | ((encoding-vector (make-vector 256 nil)) | |
479 | (i 0) | |
480 | (vec ;; mac-roman (128..255) -> UCS mapping | |
481 | [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS | |
482 | #x00C5 ;; 129:LATIN CAPITAL LETTER A WITH RING ABOVE | |
483 | #x00C7 ;; 130:LATIN CAPITAL LETTER C WITH CEDILLA | |
484 | #x00C9 ;; 131:LATIN CAPITAL LETTER E WITH ACUTE | |
485 | #x00D1 ;; 132:LATIN CAPITAL LETTER N WITH TILDE | |
486 | #x00D6 ;; 133:LATIN CAPITAL LETTER O WITH DIAERESIS | |
487 | #x00DC ;; 134:LATIN CAPITAL LETTER U WITH DIAERESIS | |
488 | #x00E1 ;; 135:LATIN SMALL LETTER A WITH ACUTE | |
489 | #x00E0 ;; 136:LATIN SMALL LETTER A WITH GRAVE | |
490 | #x00E2 ;; 137:LATIN SMALL LETTER A WITH CIRCUMFLEX | |
491 | #x00E4 ;; 138:LATIN SMALL LETTER A WITH DIAERESIS | |
492 | #x00E3 ;; 139:LATIN SMALL LETTER A WITH TILDE | |
493 | #x00E5 ;; 140:LATIN SMALL LETTER A WITH RING ABOVE | |
494 | #x00E7 ;; 141:LATIN SMALL LETTER C WITH CEDILLA | |
495 | #x00E9 ;; 142:LATIN SMALL LETTER E WITH ACUTE | |
496 | #x00E8 ;; 143:LATIN SMALL LETTER E WITH GRAVE | |
497 | #x00EA ;; 144:LATIN SMALL LETTER E WITH CIRCUMFLEX | |
498 | #x00EB ;; 145:LATIN SMALL LETTER E WITH DIAERESIS | |
499 | #x00ED ;; 146:LATIN SMALL LETTER I WITH ACUTE | |
500 | #x00EC ;; 147:LATIN SMALL LETTER I WITH GRAVE | |
501 | #x00EE ;; 148:LATIN SMALL LETTER I WITH CIRCUMFLEX | |
502 | #x00EF ;; 149:LATIN SMALL LETTER I WITH DIAERESIS | |
503 | #x00F1 ;; 150:LATIN SMALL LETTER N WITH TILDE | |
504 | #x00F3 ;; 151:LATIN SMALL LETTER O WITH ACUTE | |
505 | #x00F2 ;; 152:LATIN SMALL LETTER O WITH GRAVE | |
506 | #x00F4 ;; 153:LATIN SMALL LETTER O WITH CIRCUMFLEX | |
507 | #x00F6 ;; 154:LATIN SMALL LETTER O WITH DIAERESIS | |
508 | #x00F5 ;; 155:LATIN SMALL LETTER O WITH TILDE | |
509 | #x00FA ;; 156:LATIN SMALL LETTER U WITH ACUTE | |
510 | #x00F9 ;; 157:LATIN SMALL LETTER U WITH GRAVE | |
511 | #x00FB ;; 158:LATIN SMALL LETTER U WITH CIRCUMFLEX | |
512 | #x00FC ;; 159:LATIN SMALL LETTER U WITH DIAERESIS | |
513 | #x2020 ;; 160:DAGGER | |
514 | #x00B0 ;; 161:DEGREE SIGN | |
515 | #x00A2 ;; 162:CENT SIGN | |
516 | #x00A3 ;; 163:POUND SIGN | |
517 | #x00A7 ;; 164:SECTION SIGN | |
518 | #x2022 ;; 165:BULLET | |
519 | #x00B6 ;; 166:PILCROW SIGN | |
520 | #x00DF ;; 167:LATIN SMALL LETTER SHARP S | |
521 | #x00AE ;; 168:REGISTERED SIGN | |
522 | #x00A9 ;; 169:COPYRIGHT SIGN | |
523 | #x2122 ;; 170:TRADE MARK SIGN | |
524 | #x00B4 ;; 171:ACUTE ACCENT | |
525 | #x00A8 ;; 172:DIAERESIS | |
526 | #x2260 ;; 173:NOT EQUAL TO | |
527 | #x00C6 ;; 174:LATIN CAPITAL LETTER AE | |
528 | #x00D8 ;; 175:LATIN CAPITAL LETTER O WITH STROKE | |
529 | #x221E ;; 176:INFINITY | |
530 | #x00B1 ;; 177:PLUS-MINUS SIGN | |
531 | #x2264 ;; 178:LESS-THAN OR EQUAL TO | |
532 | #x2265 ;; 179:GREATER-THAN OR EQUAL TO | |
533 | #x00A5 ;; 180:YEN SIGN | |
534 | #x00B5 ;; 181:MICRO SIGN | |
535 | #x2202 ;; 182:PARTIAL DIFFERENTIAL | |
536 | #x2211 ;; 183:N-ARY SUMMATION | |
537 | #x220F ;; 184:N-ARY PRODUCT | |
538 | #x03C0 ;; 185:GREEK SMALL LETTER PI | |
539 | #x222B ;; 186:INTEGRAL | |
540 | #x00AA ;; 187:FEMININE ORDINAL INDICATOR | |
541 | #x00BA ;; 188:MASCULINE ORDINAL INDICATOR | |
542 | #x03A9 ;; 189:GREEK CAPITAL LETTER OMEGA | |
543 | #x00E6 ;; 190:LATIN SMALL LETTER AE | |
544 | #x00F8 ;; 191:LATIN SMALL LETTER O WITH STROKE | |
545 | #x00BF ;; 192:INVERTED QUESTION MARK | |
546 | #x00A1 ;; 193:INVERTED EXCLAMATION MARK | |
547 | #x00AC ;; 194:NOT SIGN | |
548 | #x221A ;; 195:SQUARE ROOT | |
549 | #x0192 ;; 196:LATIN SMALL LETTER F WITH HOOK | |
550 | #x2248 ;; 197:ALMOST EQUAL TO | |
551 | #x2206 ;; 198:INCREMENT | |
552 | #x00AB ;; 199:LEFT-POINTING DOUBLE ANGLE QUOTATION MARK | |
553 | #x00BB ;; 200:RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK | |
554 | #x2026 ;; 201:HORIZONTAL ELLIPSIS | |
555 | #x00A0 ;; 202:NO-BREAK SPACE | |
556 | #x00C0 ;; 203:LATIN CAPITAL LETTER A WITH GRAVE | |
557 | #x00C3 ;; 204:LATIN CAPITAL LETTER A WITH TILDE | |
558 | #x00D5 ;; 205:LATIN CAPITAL LETTER O WITH TILDE | |
559 | #x0152 ;; 206:LATIN CAPITAL LIGATURE OE | |
560 | #x0153 ;; 207:LATIN SMALL LIGATURE OE | |
561 | #x2013 ;; 208:EN DASH | |
562 | #x2014 ;; 209:EM DASH | |
563 | #x201C ;; 210:LEFT DOUBLE QUOTATION MARK | |
564 | #x201D ;; 211:RIGHT DOUBLE QUOTATION MARK | |
565 | #x2018 ;; 212:LEFT SINGLE QUOTATION MARK | |
566 | #x2019 ;; 213:RIGHT SINGLE QUOTATION MARK | |
567 | #x00F7 ;; 214:DIVISION SIGN | |
568 | #x25CA ;; 215:LOZENGE | |
569 | #x00FF ;; 216:LATIN SMALL LETTER Y WITH DIAERESIS | |
570 | #x0178 ;; 217:LATIN CAPITAL LETTER Y WITH DIAERESIS | |
571 | #x2044 ;; 218:FRACTION SLASH | |
572 | #x20AC ;; 219:EURO SIGN | |
573 | #x2039 ;; 220:SINGLE LEFT-POINTING ANGLE QUOTATION MARK | |
574 | #x203A ;; 221:SINGLE RIGHT-POINTING ANGLE QUOTATION MARK | |
575 | #xFB01 ;; 222:LATIN SMALL LIGATURE FI | |
576 | #xFB02 ;; 223:LATIN SMALL LIGATURE FL | |
577 | #x2021 ;; 224:DOUBLE DAGGER | |
578 | #x00B7 ;; 225:MIDDLE DOT | |
579 | #x201A ;; 226:SINGLE LOW-9 QUOTATION MARK | |
580 | #x201E ;; 227:DOUBLE LOW-9 QUOTATION MARK | |
581 | #x2030 ;; 228:PER MILLE SIGN | |
582 | #x00C2 ;; 229:LATIN CAPITAL LETTER A WITH CIRCUMFLEX | |
583 | #x00CA ;; 230:LATIN CAPITAL LETTER E WITH CIRCUMFLEX | |
584 | #x00C1 ;; 231:LATIN CAPITAL LETTER A WITH ACUTE | |
585 | #x00CB ;; 232:LATIN CAPITAL LETTER E WITH DIAERESIS | |
586 | #x00C8 ;; 233:LATIN CAPITAL LETTER E WITH GRAVE | |
587 | #x00CD ;; 234:LATIN CAPITAL LETTER I WITH ACUTE | |
588 | #x00CE ;; 235:LATIN CAPITAL LETTER I WITH CIRCUMFLEX | |
589 | #x00CF ;; 236:LATIN CAPITAL LETTER I WITH DIAERESIS | |
590 | #x00CC ;; 237:LATIN CAPITAL LETTER I WITH GRAVE | |
591 | #x00D3 ;; 238:LATIN CAPITAL LETTER O WITH ACUTE | |
592 | #x00D4 ;; 239:LATIN CAPITAL LETTER O WITH CIRCUMFLEX | |
593 | #xF8FF ;; 240:Apple logo | |
594 | #x00D2 ;; 241:LATIN CAPITAL LETTER O WITH GRAVE | |
595 | #x00DA ;; 242:LATIN CAPITAL LETTER U WITH ACUTE | |
596 | #x00DB ;; 243:LATIN CAPITAL LETTER U WITH CIRCUMFLEX | |
597 | #x00D9 ;; 244:LATIN CAPITAL LETTER U WITH GRAVE | |
598 | #x0131 ;; 245:LATIN SMALL LETTER DOTLESS I | |
599 | #x02C6 ;; 246:MODIFIER LETTER CIRCUMFLEX ACCENT | |
600 | #x02DC ;; 247:SMALL TILDE | |
601 | #x00AF ;; 248:MACRON | |
602 | #x02D8 ;; 249:BREVE | |
603 | #x02D9 ;; 250:DOT ABOVE | |
604 | #x02DA ;; 251:RING ABOVE | |
605 | #x00B8 ;; 252:CEDILLA | |
606 | #x02DD ;; 253:DOUBLE ACUTE ACCENT | |
607 | #x02DB ;; 254:OGONEK | |
608 | #x02C7 ;; 255:CARON | |
609 | ]) | |
610 | translation-table) | |
611 | (while (< i 128) | |
612 | (aset encoding-vector i i) | |
613 | (setq i (1+ i))) | |
614 | (while (< i 256) | |
615 | (aset encoding-vector i | |
616 | (decode-char 'ucs (aref vec (- i 128)))) | |
617 | (setq i (1+ i))) | |
618 | (setq translation-table | |
619 | (make-translation-table-from-vector encoding-vector)) | |
620 | (define-translation-table 'mac-roman-decoder translation-table) | |
a1506d29 | 621 | (define-translation-table 'mac-roman-encoder |
71070f12 KH |
622 | (char-table-extra-slot translation-table 0))) |
623 | ||
624 | (define-ccl-program decode-mac-roman | |
625 | `(4 | |
626 | ((loop | |
627 | (read r1) | |
628 | (if (r1 < 128) ;; ASCII | |
629 | (r0 = ,(charset-id 'ascii)) | |
546790cb | 630 | (if (r1 < 160) |
71070f12 KH |
631 | (r0 = ,(charset-id 'eight-bit-control)) |
632 | (r0 = ,(charset-id 'eight-bit-graphic)))) | |
633 | (translate-character mac-roman-decoder r0 r1) | |
634 | (write-multibyte-character r0 r1) | |
635 | (repeat)))) | |
636 | "CCL program to decode Mac Roman") | |
637 | ||
638 | (define-ccl-program encode-mac-roman | |
639 | `(1 | |
640 | ((loop | |
641 | (read-multibyte-character r0 r1) | |
57ef7816 | 642 | (translate-character ucs-mule-to-mule-unicode r0 r1) |
71070f12 | 643 | (translate-character mac-roman-encoder r0 r1) |
d8504583 KH |
644 | (if (r0 != ,(charset-id 'ascii)) |
645 | (if (r0 != ,(charset-id 'eight-bit-graphic)) | |
646 | (if (r0 != ,(charset-id 'eight-bit-control)) | |
647 | (r1 = ??)))) | |
71070f12 KH |
648 | (write-repeat r1)))) |
649 | "CCL program to encode Mac Roman") | |
650 | ||
651 | (make-coding-system | |
5ef35063 WL |
652 | 'mac-roman 4 ?M |
653 | "Mac Roman Encoding (MIME:MACINTOSH)." | |
71070f12 | 654 | '(decode-mac-roman . encode-mac-roman) |
0a5cb0d4 EZ |
655 | (list (cons 'safe-chars (get 'mac-roman-encoder 'translation-table)) |
656 | '(valid-codes (0 . 255)) | |
657 | '(mime-charset . macintosh))) ; per IANA, rfc1345 | |
71070f12 | 658 | |
5180cc01 DL |
659 | (defconst diacritic-composition-pattern "\\C^\\c^+") |
660 | ||
5180cc01 DL |
661 | (defun diacritic-compose-region (beg end) |
662 | "Compose diacritic characters in the region. | |
663 | When called from a program, expects two arguments, | |
664 | positions (integers or markers) specifying the region." | |
665 | (interactive "r") | |
666 | (save-restriction | |
667 | (narrow-to-region beg end) | |
668 | (goto-char (point-min)) | |
669 | (while (re-search-forward diacritic-composition-pattern nil t) | |
670 | (compose-region (match-beginning 0) (match-end 0))))) | |
671 | ||
5180cc01 DL |
672 | (defun diacritic-compose-string (string) |
673 | "Compose diacritic characters in STRING and return the resulting string." | |
674 | (let ((idx 0)) | |
675 | (while (setq idx (string-match diacritic-composition-pattern string idx)) | |
676 | (compose-string string idx (match-end 0)) | |
677 | (setq idx (match-end 0)))) | |
678 | string) | |
a1506d29 | 679 | |
5180cc01 DL |
680 | (defun diacritic-compose-buffer () |
681 | "Compose diacritic characters in the current buffer." | |
682 | (interactive) | |
683 | (diacritic-compose-region (point-min) (point-max))) | |
684 | ||
5180cc01 DL |
685 | (defun diacritic-post-read-conversion (len) |
686 | (diacritic-compose-region (point) (+ (point) len)) | |
687 | len) | |
688 | ||
5180cc01 DL |
689 | (defun diacritic-composition-function (from to pattern &optional string) |
690 | "Compose diacritic text in the region FROM and TO. | |
691 | The text matches the regular expression PATTERN. | |
692 | Optional 4th argument STRING, if non-nil, is a string containing text | |
693 | to compose. | |
694 | ||
34b5d116 DL |
695 | The return value is the number of composed characters." |
696 | (when (< (1+ from) to) | |
697 | (if string | |
698 | (compose-string string from to) | |
699 | (compose-region from to)) | |
700 | (- to from))) | |
5180cc01 DL |
701 | |
702 | ;; Register a function to compose Unicode diacrtics and marks. | |
5f3648c4 | 703 | (let ((patterns '(("\\C^\\c^+" . diacritic-composition-function)))) |
5180cc01 DL |
704 | (let ((c #x300)) |
705 | (while (<= c #x362) | |
706 | (aset composition-function-table (decode-char 'ucs c) patterns) | |
707 | (setq c (1+ c))) | |
708 | (setq c #x20d0) | |
709 | (while (<= c #x20e3) | |
710 | (aset composition-function-table (decode-char 'ucs c) patterns) | |
711 | (setq c (1+ c))))) | |
712 | ||
27ff18c9 DL |
713 | (provide 'european) |
714 | ||
ab5796a9 | 715 | ;;; arch-tag: 9e018b12-fb02-4120-907b-9adeaf84b5c2 |
4ed46869 | 716 | ;;; european.el ends here |