Commit | Line | Data |
---|---|---|
56c8bc03 | 1 | ;;; european.el --- European languages -*- coding: iso-2022-7bit; -*- |
4ed46869 | 2 | |
fa526c4a RS |
3 | ;; Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN. |
4 | ;; Licensed to the Free Software Foundation. | |
4ed46869 KH |
5 | |
6 | ;; Keywords: multilingual, European | |
7 | ||
8 | ;; This file is part of GNU Emacs. | |
9 | ||
10 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 | ;; it under the terms of the GNU General Public License as published by | |
12 | ;; the Free Software Foundation; either version 2, or (at your option) | |
13 | ;; any later version. | |
14 | ||
15 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;; GNU General Public License for more details. | |
19 | ||
20 | ;; You should have received a copy of the GNU General Public License | |
369314dc KH |
21 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 | ;; Boston, MA 02111-1307, USA. | |
4ed46869 KH |
24 | |
25 | ;;; Commentary: | |
26 | ||
cce3ba48 | 27 | ;; For Europeans, character sets ISO8859-1,2,3,4,9,14,15 are supported. |
4ed46869 KH |
28 | |
29 | ;;; Code: | |
30 | ||
5c4794f3 | 31 | ;; Latin-1 (ISO-8859-1) |
335a7ad7 | 32 | |
4ed46869 | 33 | (make-coding-system |
4b9121fc | 34 | 'iso-latin-1 2 ?1 |
b775a472 | 35 | "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)" |
3617715a KH |
36 | '(ascii latin-iso8859-1 nil nil |
37 | nil nil nil nil nil nil nil nil nil nil nil nil t) | |
38 | '((safe-charsets ascii latin-iso8859-1) | |
39 | (mime-charset . iso-8859-1))) | |
4ed46869 | 40 | |
71eabd24 | 41 | (define-coding-system-alias 'iso-8859-1 'iso-latin-1) |
300c450d | 42 | (define-coding-system-alias 'latin-1 'iso-latin-1) |
3617715a KH |
43 | |
44 | (make-coding-system | |
45 | 'compound-text 2 ?1 | |
46 | "ISO 2022 based encoding used in inter client communication of X" | |
47 | '((ascii t) (latin-iso8859-1 t) nil nil | |
48 | nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil nil t) | |
49 | '((safe-charsets . t))) | |
50 | ||
51 | (define-coding-system-alias 'ctext 'compound-text) | |
4ed46869 | 52 | |
335a7ad7 | 53 | (defun setup-latin1-environment () |
5c4794f3 | 54 | "Set up multilingual environment (MULE) for European Latin-1 users." |
335a7ad7 | 55 | (interactive) |
bed54678 | 56 | (set-language-environment "Latin-1")) |
335a7ad7 KH |
57 | |
58 | (set-language-info-alist | |
bed54678 | 59 | "Latin-1" '((charset ascii latin-iso8859-1) |
3617715a KH |
60 | (coding-system iso-latin-1) |
61 | (coding-priority iso-latin-1) | |
bed54678 | 62 | (nonascii-translation . latin-iso8859-1) |
16b2eb50 | 63 | (unibyte-syntax . "latin-1") |
bed54678 | 64 | (unibyte-display . iso-latin-1) |
3e56710f | 65 | (input-method . "latin-1-prefix") |
5c4794f3 RS |
66 | (sample-text |
67 | . "Hello, Hej, Tere, Hei, Bonjour, Gr\e,A|_\e(B Gott, Ciao, \e,A!\e(BHola!") | |
3617715a | 68 | (documentation . "\ |
cce3ba48 DL |
69 | This language environment is a generic one for the Latin-1 (ISO-8859-1) |
70 | character set which supports the following European languages: | |
71 | Albanian, Basque, Breton, Catalan, Danish, Dutch, English, Faeroese, | |
72 | Finnish, French (with restrictions -- see Latin-9), Frisian, Galician, | |
73 | German, Greenlandic, Icelandic, Irish Gaelic (new orthography), | |
74 | Italian, Latin, Luxemburgish, Norwegian, Portuguese, Rhaeto-Romanic, | |
75 | Scottish Gaelic, Spanish, and Swedish. | |
76 | We also have a German specific language environment \"German\". | |
77 | ||
78 | Latin-1 also covers several written languages outside Europe, including | |
79 | Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans.")) | |
3617715a KH |
80 | '("European")) |
81 | ||
335a7ad7 | 82 | \f |
5c4794f3 | 83 | ;; Latin-2 (ISO-8859-2) |
335a7ad7 | 84 | |
4ed46869 | 85 | (make-coding-system |
4b9121fc KH |
86 | 'iso-latin-2 2 ?2 |
87 | "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)" | |
3617715a KH |
88 | '(ascii latin-iso8859-2 nil nil |
89 | nil nil nil nil nil nil nil) | |
90 | '((safe-charsets ascii latin-iso8859-2) | |
91 | (mime-charset . iso-8859-2))) | |
4ed46869 | 92 | |
71eabd24 | 93 | (define-coding-system-alias 'iso-8859-2 'iso-latin-2) |
300c450d | 94 | (define-coding-system-alias 'latin-2 'iso-latin-2) |
4b9121fc | 95 | |
335a7ad7 | 96 | (defun setup-latin2-environment () |
5c4794f3 | 97 | "Set up multilingual environment (MULE) for European Latin-2 users." |
335a7ad7 | 98 | (interactive) |
b775a472 | 99 | (set-language-environment "Latin-2")) |
335a7ad7 KH |
100 | |
101 | (set-language-info-alist | |
bed54678 | 102 | "Latin-2" '((charset ascii latin-iso8859-2) |
3617715a KH |
103 | (coding-system iso-latin-2) |
104 | (coding-priority iso-latin-2) | |
bed54678 | 105 | (nonascii-translation . latin-iso8859-2) |
16b2eb50 | 106 | (unibyte-syntax . "latin-2") |
bed54678 | 107 | (unibyte-display . iso-latin-2) |
3e56710f | 108 | (input-method . "latin-2-prefix") |
3617715a | 109 | (documentation . "\ |
cce3ba48 | 110 | This language environment is a generic one for the Latin-2 (ISO-8859-2) |
e325120d | 111 | character set which supports the following languages: |
60763153 | 112 | Albanian, Czech, English, German, Hungarian, Polish, Romanian, |
59c1ccf2 | 113 | Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower), |
e325120d KH |
114 | and Swedish. |
115 | We also have specific language environments for the following languages: | |
116 | For Czech, \"Czech\". | |
117 | For Romanian, \"Romanian\". | |
118 | For Slovak, \"Slovak\".")) | |
3617715a KH |
119 | '("European")) |
120 | ||
335a7ad7 | 121 | \f |
5c4794f3 | 122 | ;; Latin-3 (ISO-8859-3) |
335a7ad7 | 123 | |
4ed46869 | 124 | (make-coding-system |
4b9121fc KH |
125 | 'iso-latin-3 2 ?3 |
126 | "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)" | |
3617715a KH |
127 | '(ascii latin-iso8859-3 nil nil |
128 | nil nil nil nil nil nil nil) | |
129 | '((safe-charsets ascii latin-iso8859-3) | |
130 | (mime-charset . iso-8859-3))) | |
4ed46869 | 131 | |
71eabd24 | 132 | (define-coding-system-alias 'iso-8859-3 'iso-latin-3) |
300c450d | 133 | (define-coding-system-alias 'latin-3 'iso-latin-3) |
4b9121fc | 134 | |
335a7ad7 | 135 | (defun setup-latin3-environment () |
5c4794f3 | 136 | "Set up multilingual environment (MULE) for European Latin-3 users." |
335a7ad7 | 137 | (interactive) |
bed54678 | 138 | (set-language-environment "Latin-3")) |
335a7ad7 KH |
139 | |
140 | (set-language-info-alist | |
bed54678 | 141 | "Latin-3" '((charset ascii latin-iso8859-3) |
3617715a KH |
142 | (coding-system iso-latin-3) |
143 | (coding-priority iso-latin-3) | |
bed54678 | 144 | (nonascii-translation . latin-iso8859-3) |
16b2eb50 | 145 | (unibyte-syntax . "latin-3") |
bed54678 | 146 | (unibyte-display . iso-latin-3) |
3e56710f | 147 | (input-method . "latin-3-prefix") |
3617715a | 148 | (documentation . "\ |
60763153 RS |
149 | These languages are supported with the Latin-3 (ISO-8859-3) character set: |
150 | Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician, | |
3617715a KH |
151 | German, Italian, Maltese, Spanish, and Turkish.")) |
152 | '("European")) | |
153 | ||
335a7ad7 | 154 | \f |
5c4794f3 | 155 | ;; Latin-4 (ISO-8859-4) |
335a7ad7 | 156 | |
4ed46869 | 157 | (make-coding-system |
4b9121fc KH |
158 | 'iso-latin-4 2 ?4 |
159 | "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)" | |
3617715a KH |
160 | '(ascii latin-iso8859-4 nil nil |
161 | nil nil nil nil nil nil nil) | |
162 | '((safe-charsets ascii latin-iso8859-4) | |
163 | (mime-charset . iso-8895-4))) | |
4ed46869 | 164 | |
71eabd24 | 165 | (define-coding-system-alias 'iso-8859-4 'iso-latin-4) |
300c450d | 166 | (define-coding-system-alias 'latin-4 'iso-latin-4) |
4b9121fc | 167 | |
335a7ad7 | 168 | (defun setup-latin4-environment () |
5c4794f3 | 169 | "Set up multilingual environment (MULE) for European Latin-4 users." |
335a7ad7 | 170 | (interactive) |
bed54678 | 171 | (set-language-environment "Latin-4")) |
335a7ad7 KH |
172 | |
173 | (set-language-info-alist | |
bed54678 | 174 | "Latin-4" '((charset ascii latin-iso8859-4) |
3617715a KH |
175 | (coding-system iso-8859-4) |
176 | (coding-priority iso-8859-4) | |
bed54678 | 177 | (nonascii-translation . latin-iso8859-4) |
16b2eb50 | 178 | (unibyte-syntax . "latin-4") |
bed54678 | 179 | (unibyte-display . iso-8859-4) |
3e56710f | 180 | (input-method . "latin-4-prefix") |
3617715a | 181 | (documentation . "\ |
60763153 RS |
182 | These languages are supported with the Latin-4 (ISO-8859-4) character set: |
183 | Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, | |
3617715a KH |
184 | Latvian, Lithuanian, and Norwegian.")) |
185 | '("European")) | |
186 | ||
335a7ad7 | 187 | \f |
5c4794f3 | 188 | ;; Latin-5 (ISO-8859-9) |
335a7ad7 | 189 | |
4ed46869 | 190 | (make-coding-system |
4b9121fc KH |
191 | 'iso-latin-5 2 ?9 |
192 | "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)" | |
3617715a KH |
193 | '(ascii latin-iso8859-9 nil nil |
194 | nil nil nil nil nil nil nil) | |
195 | '((safe-charsets ascii latin-iso8859-9) | |
196 | (mime-charset . iso-8859-9))) | |
4ed46869 | 197 | |
71eabd24 | 198 | (define-coding-system-alias 'iso-8859-9 'iso-latin-5) |
300c450d | 199 | (define-coding-system-alias 'latin-5 'iso-latin-5) |
4b9121fc | 200 | |
335a7ad7 | 201 | (defun setup-latin5-environment () |
5c4794f3 | 202 | "Set up multilingual environment (MULE) for European Latin-5 users." |
335a7ad7 | 203 | (interactive) |
bed54678 | 204 | (set-language-environment "Latin-5")) |
3617715a KH |
205 | |
206 | (set-language-info-alist | |
bed54678 | 207 | "Latin-5" '((charset ascii latin-iso8859-9) |
3617715a KH |
208 | (coding-system iso-latin-5) |
209 | (coding-priority iso-latin-5) | |
bed54678 | 210 | (nonascii-translation . latin-iso8859-9) |
16b2eb50 | 211 | (unibyte-syntax . "latin-5") |
bed54678 | 212 | (unibyte-display . iso-latin-5) |
3e56710f | 213 | (input-method . "latin-5-prefix") |
3617715a | 214 | (documentation . "\ |
cce3ba48 DL |
215 | These languages are supported with the Latin-5 (ISO-8859-9) character set: |
216 | Bulgarian, Byelorussian, (Slavic) Macedonian, Russian, Serbian and | |
217 | Ukranian.")) ; says ISO 8859-1 | |
218 | '("European")) | |
219 | ||
220 | \f | |
221 | ;; Latin-8 (ISO-8859-14) | |
222 | ||
223 | (make-coding-system | |
224 | 'iso-latin-8 2 ?W ; `W' for `Welsh', since `C' | |
225 | ; for `Celtic' is taken. | |
226 | "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)" | |
227 | '(ascii latin-iso8859-14 nil nil | |
228 | nil nil nil nil nil nil nil nil nil nil nil nil t) | |
229 | '((safe-charsets ascii latin-iso8859-14) | |
230 | (mime-charset . iso-8859-14))) | |
231 | ||
232 | (define-coding-system-alias 'iso-8859-14 'iso-latin-8) | |
233 | (define-coding-system-alias 'latin-8 'iso-latin-8) | |
234 | ||
235 | (defun setup-latin8-environment () | |
236 | "Set up multilingual environment (MULE) for European Latin-8 users." | |
237 | (interactive) | |
238 | (set-language-environment "latin-8")) | |
239 | ||
240 | (set-language-info-alist | |
241 | "Latin-8" '((charset ascii latin-iso8859-14) | |
242 | (coding-system iso-latin-8) | |
243 | (coding-priority iso-latin-8) | |
244 | (nonascii-translation . latin-iso8859-14) | |
245 | (unibyte-syntax . "latin-8") | |
246 | (unibyte-display . iso-latin-8) | |
247 | (input-method . "latin-1-prefix") ; fixme | |
248 | ;;; Fixme: Welsh/Ga{e}lic greetings | |
249 | ;;; (sample-text | |
250 | ;;; . "") | |
251 | (documentation . "\ | |
252 | This language environment is a generic one for the Latin-8 (ISO-8859-14) | |
253 | character set which supports the Celtic languages, specifically Welsh and | |
254 | Irish Gaelic (old orthography) which are not covered by other ISO-8859 | |
255 | character sets.")) | |
3617715a | 256 | '("European")) |
cce3ba48 DL |
257 | \f |
258 | ;; Latin-9 (ISO-8859-15) | |
259 | ||
260 | (make-coding-system | |
261 | 'iso-latin-9 2 ?0 ; `0' for `Latin-0' | |
262 | "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)" | |
263 | '(ascii latin-iso8859-15 nil nil | |
264 | nil nil nil nil nil nil nil nil nil nil nil nil t) | |
265 | '((safe-charsets ascii latin-iso8859-15) | |
266 | (mime-charset . iso-8859-15))) | |
267 | ||
268 | (define-coding-system-alias 'iso-8859-15 'iso-latin-9) | |
269 | (define-coding-system-alias 'latin-9 'iso-latin-9) | |
270 | (define-coding-system-alias 'latin-0 'iso-latin-9) | |
3617715a | 271 | |
cce3ba48 DL |
272 | (defun setup-latin9-environment () |
273 | "Set up multilingual environment (MULE) for European Latin-9 users." | |
274 | (interactive) | |
275 | (set-language-environment "latin-9")) | |
276 | ||
277 | (set-language-info-alist | |
278 | "Latin-9" '((charset ascii latin-iso8859-15) | |
279 | (coding-system iso-latin-9) | |
280 | (coding-priority iso-latin-9) | |
281 | (nonascii-translation . latin-iso8859-15) | |
282 | (unibyte-syntax . "latin-9") | |
283 | (unibyte-display . iso-latin-9) | |
284 | (input-method . "latin-1-prefix") ; fixme? | |
285 | (sample-text | |
286 | . "Ave Latinum IX, \e,b&(48<=>\e(B \e,b$$$\e(B") | |
287 | (documentation . "\ | |
288 | This language environment is a generic one for the Latin-9 (ISO-8859-15) | |
289 | character set which supports the same languages as Latin-1 with the | |
290 | addition of the Euro sign and some additional French and Finnish letters. | |
291 | Latin-9 is sometimes nicknamed `Latin-0'.")) | |
292 | '("European")) | |
3617715a KH |
293 | \f |
294 | (defun setup-german-environment () | |
295 | "Set up multilingual environment (MULE) for German users." | |
296 | (interactive) | |
bed54678 | 297 | (set-language-environment "German")) |
4ed46869 | 298 | |
4ed46869 | 299 | (set-language-info-alist |
bed54678 | 300 | "German" '((tutorial . "TUTORIAL.de") |
3617715a KH |
301 | (charset ascii latin-iso8859-1) |
302 | (coding-system iso-latin-1) | |
303 | (coding-priority iso-latin-1) | |
3e56710f | 304 | (input-method . "german-postfix") |
bed54678 | 305 | (nonascii-translation . iso-latin-1) |
16b2eb50 | 306 | (unibyte-syntax . "latin-1") |
bed54678 | 307 | (unibyte-display . iso-latin-1) |
3617715a KH |
308 | (sample-text . "\ |
309 | German (Deutsch Nord) Guten Tag | |
310 | German (Deutsch S\e,A|\e(Bd) Gr\e,A|_\e(B Gott") | |
311 | (documentation . "\ | |
312 | This language environment is almost the same as Latin-1, | |
313 | but default input method is set to \"german-postfix\".")) | |
314 | '("European")) | |
8dfef503 | 315 | |
e0980142 RS |
316 | (defun setup-slovenian-environment () |
317 | "Setup multilingual environment (MULE) for Slovenian." | |
318 | (interactive) | |
319 | (set-language-environment "Slovenian")) | |
320 | ||
321 | (set-language-info-alist | |
322 | "Slovenian" '((charset . (ascii latin-iso8859-2)) | |
323 | (coding-system . (iso-8859-2)) | |
324 | (coding-priority . (iso-8859-2)) | |
325 | (nonascii-translation . latin-iso8859-2) | |
326 | (input-method . "latin-2-postfix") | |
327 | (unibyte-syntax . "latin-2") | |
328 | (unibyte-display . iso-8859-2) | |
329 | (tutorial . "TUTORIAL.sl") | |
330 | (sample-text . "\e,B.\e(Belimo vam uspe\e,B9\e(Ben dan!") | |
331 | (documentation . t)) | |
332 | '("European")) | |
333 | ||
d22c4fb9 KH |
334 | ;; For Turkish, the character set ISO-8859-9 (Latin-5) is used. But, |
335 | ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3) | |
336 | ;; was used for Turkish. Those who use Latin-3 for Turkish should use | |
337 | ;; "Latin-3" language environment. | |
338 | ||
339 | (set-language-info-alist | |
340 | "Turkish" '((charset ascii latin-iso8859-9) | |
341 | (coding-system iso-latin-5) | |
342 | (coding-priority iso-latin-5) | |
343 | (nonascii-translation . latin-iso8859-9) | |
344 | (unibyte-syntax . "latin-5") | |
345 | (unibyte-display . iso-latin-5) | |
346 | (input-method . "turkish-postfix") | |
347 | (sample-text . "Turkish (T\e,M|\e(Brk\e,Mg\e(Be) Merhaba") | |
348 | (documentation . t))) | |
349 | ||
4ed46869 | 350 | ;;; european.el ends here |