.
[emacs.git] / lisp / language / european.el
blobfca16db083261bad4f618557b283cf8b7a60402e
1 ;;; european.el --- European languages -*- coding: iso-2022-7bit; -*-
3 ;; Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
6 ;; Keywords: multilingual, European
8 ;; This file is part of GNU Emacs.
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.
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.
20 ;; You should have received a copy of the GNU General Public License
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.
25 ;;; Commentary:
27 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported.
29 ;;; Code:
31 ;; Latin-1 (ISO-8859-1)
33 (make-coding-system
34 'iso-latin-1 2 ?1
35 "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)"
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)))
41 (define-coding-system-alias 'iso-8859-1 'iso-latin-1)
42 (define-coding-system-alias 'latin-1 'iso-latin-1)
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)))
51 (define-coding-system-alias 'ctext 'compound-text)
53 (defun setup-latin1-environment ()
54 "Set up multilingual environment (MULE) for European Latin-1 users."
55 (interactive)
56 (set-language-environment "Latin-1"))
58 (set-language-info-alist
59 "Latin-1" '((charset ascii latin-iso8859-1)
60 (coding-system iso-latin-1)
61 (coding-priority iso-latin-1)
62 (nonascii-translation . latin-iso8859-1)
63 (unibyte-syntax . "latin-1")
64 (unibyte-display . iso-latin-1)
65 (input-method . "latin-1-prefix")
66 (sample-text
67 . "Hello, Hej, Tere, Hei, Bonjour, Gr\e,A|_\e(B Gott, Ciao, \e,A!\e(BHola!")
68 (documentation . "\
69 This language environment is a generic one for Latin-1 (ISO-8859-1)
70 character set which supports the following languages:
71 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
72 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
73 We also have a German specific language environment \"German\"."))
74 '("European"))
77 ;; Latin-2 (ISO-8859-2)
79 (make-coding-system
80 'iso-latin-2 2 ?2
81 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)"
82 '(ascii latin-iso8859-2 nil nil
83 nil nil nil nil nil nil nil)
84 '((safe-charsets ascii latin-iso8859-2)
85 (mime-charset . iso-8859-2)))
87 (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
88 (define-coding-system-alias 'latin-2 'iso-latin-2)
90 (defun setup-latin2-environment ()
91 "Set up multilingual environment (MULE) for European Latin-2 users."
92 (interactive)
93 (set-language-environment "Latin-2"))
95 (set-language-info-alist
96 "Latin-2" '((charset ascii latin-iso8859-2)
97 (coding-system iso-latin-2)
98 (coding-priority iso-latin-2)
99 (nonascii-translation . latin-iso8859-2)
100 (unibyte-syntax . "latin-2")
101 (unibyte-display . iso-latin-2)
102 (input-method . "latin-2-prefix")
103 (documentation . "\
104 This language environment is a generic one for Latin-2 (ISO-8859-2)
105 character set which supports the following languages:
106 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
107 Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower),
108 and Swedish.
109 We also have specific language environments for the following languages:
110 For Czech, \"Czech\".
111 For Romanian, \"Romanian\".
112 For Slovak, \"Slovak\"."))
113 '("European"))
116 ;; Latin-3 (ISO-8859-3)
118 (make-coding-system
119 'iso-latin-3 2 ?3
120 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)"
121 '(ascii latin-iso8859-3 nil nil
122 nil nil nil nil nil nil nil)
123 '((safe-charsets ascii latin-iso8859-3)
124 (mime-charset . iso-8859-3)))
126 (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
127 (define-coding-system-alias 'latin-3 'iso-latin-3)
129 (defun setup-latin3-environment ()
130 "Set up multilingual environment (MULE) for European Latin-3 users."
131 (interactive)
132 (set-language-environment "Latin-3"))
134 (set-language-info-alist
135 "Latin-3" '((charset ascii latin-iso8859-3)
136 (coding-system iso-latin-3)
137 (coding-priority iso-latin-3)
138 (nonascii-translation . latin-iso8859-3)
139 (unibyte-syntax . "latin-3")
140 (unibyte-display . iso-latin-3)
141 (input-method . "latin-3-prefix")
142 (documentation . "\
143 These languages are supported with the Latin-3 (ISO-8859-3) character set:
144 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
145 German, Italian, Maltese, Spanish, and Turkish."))
146 '("European"))
149 ;; Latin-4 (ISO-8859-4)
151 (make-coding-system
152 'iso-latin-4 2 ?4
153 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)"
154 '(ascii latin-iso8859-4 nil nil
155 nil nil nil nil nil nil nil)
156 '((safe-charsets ascii latin-iso8859-4)
157 (mime-charset . iso-8895-4)))
159 (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
160 (define-coding-system-alias 'latin-4 'iso-latin-4)
162 (defun setup-latin4-environment ()
163 "Set up multilingual environment (MULE) for European Latin-4 users."
164 (interactive)
165 (set-language-environment "Latin-4"))
167 (set-language-info-alist
168 "Latin-4" '((charset ascii latin-iso8859-4)
169 (coding-system iso-8859-4)
170 (coding-priority iso-8859-4)
171 (nonascii-translation . latin-iso8859-4)
172 (unibyte-syntax . "latin-4")
173 (unibyte-display . iso-8859-4)
174 (input-method . "latin-4-prefix")
175 (documentation . "\
176 These languages are supported with the Latin-4 (ISO-8859-4) character set:
177 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
178 Latvian, Lithuanian, and Norwegian."))
179 '("European"))
182 ;; Latin-5 (ISO-8859-9)
184 (make-coding-system
185 'iso-latin-5 2 ?9
186 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)"
187 '(ascii latin-iso8859-9 nil nil
188 nil nil nil nil nil nil nil)
189 '((safe-charsets ascii latin-iso8859-9)
190 (mime-charset . iso-8859-9)))
192 (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
193 (define-coding-system-alias 'latin-5 'iso-latin-5)
195 (defun setup-latin5-environment ()
196 "Set up multilingual environment (MULE) for European Latin-5 users."
197 (interactive)
198 (set-language-environment "Latin-5"))
200 (set-language-info-alist
201 "Latin-5" '((charset ascii latin-iso8859-9)
202 (coding-system iso-latin-5)
203 (coding-priority iso-latin-5)
204 (nonascii-translation . latin-iso8859-9)
205 (unibyte-syntax . "latin-5")
206 (unibyte-display . iso-latin-5)
207 (input-method . "latin-5-prefix")
208 (documentation . "\
209 These languages are supported with the Latin-5 (ISO-8859-9) character set."))
210 '("European"))
213 (defun setup-german-environment ()
214 "Set up multilingual environment (MULE) for German users."
215 (interactive)
216 (set-language-environment "German"))
218 (set-language-info-alist
219 "German" '((tutorial . "TUTORIAL.de")
220 (charset ascii latin-iso8859-1)
221 (coding-system iso-latin-1)
222 (coding-priority iso-latin-1)
223 (input-method . "german-postfix")
224 (nonascii-translation . iso-latin-1)
225 (unibyte-syntax . "latin-1")
226 (unibyte-display . iso-latin-1)
227 (sample-text . "\
228 German (Deutsch Nord) Guten Tag
229 German (Deutsch S\e,A|\e(Bd) Gr\e,A|_\e(B Gott")
230 (documentation . "\
231 This language environment is almost the same as Latin-1,
232 but default input method is set to \"german-postfix\"."))
233 '("European"))
235 (defun setup-slovenian-environment ()
236 "Setup multilingual environment (MULE) for Slovenian."
237 (interactive)
238 (set-language-environment "Slovenian"))
240 (set-language-info-alist
241 "Slovenian" '((charset . (ascii latin-iso8859-2))
242 (coding-system . (iso-8859-2))
243 (coding-priority . (iso-8859-2))
244 (nonascii-translation . latin-iso8859-2)
245 (input-method . "latin-2-postfix")
246 (unibyte-syntax . "latin-2")
247 (unibyte-display . iso-8859-2)
248 (tutorial . "TUTORIAL.sl")
249 (sample-text . "\e,B.\e(Belimo vam uspe\e,B9\e(Ben dan!")
250 (documentation . t))
251 '("European"))
253 ;; For Turkish, the character set ISO-8859-9 (Latin-5) is used. But,
254 ;; before the introduction of ISO-8859-9 in 1988, ISO-8859-3 (Latin-3)
255 ;; was used for Turkish. Those who use Latin-3 for Turkish should use
256 ;; "Latin-3" language environment.
258 (set-language-info-alist
259 "Turkish" '((charset ascii latin-iso8859-9)
260 (coding-system iso-latin-5)
261 (coding-priority iso-latin-5)
262 (nonascii-translation . latin-iso8859-9)
263 (unibyte-syntax . "latin-5")
264 (unibyte-display . iso-latin-5)
265 (input-method . "turkish-postfix")
266 (sample-text . "Turkish (T\e,M|\e(Brk\e,Mg\e(Be) Merhaba")
267 (documentation . t)))
269 ;;; european.el ends here