]> code.delx.au - gnu-emacs/blob - lisp/language/european.el
Fix previous change.
[gnu-emacs] / lisp / language / european.el
1 ;;; european.el --- Support for European languages
2
3 ;; Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
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
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.
24
25 ;;; Commentary:
26
27 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported.
28
29 ;;; Code:
30
31 ;; Latin-1 (ISO-8859-1)
32
33 (make-coding-system
34 'iso-latin-1 2 ?1
35 "ISO 2022 based 8-bit encoding for Laint-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)))
40
41 (define-coding-system-alias 'iso-8859-1 'iso-latin-1)
42 (define-coding-system-alias 'latin-1 'iso-latin-1)
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)
52
53 (defun setup-latin1-environment ()
54 "Set up multilingual environment (MULE) for European Latin-1 users."
55 (interactive)
56 (set-language-environment "Latin-1"))
57
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 These languages are supported with the Latin-1 (ISO-8859-1) character set:
70 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
71 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish."))
72 '("European"))
73
74 \f
75 ;; Latin-2 (ISO-8859-2)
76
77 (make-coding-system
78 'iso-latin-2 2 ?2
79 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)"
80 '(ascii latin-iso8859-2 nil nil
81 nil nil nil nil nil nil nil)
82 '((safe-charsets ascii latin-iso8859-2)
83 (mime-charset . iso-8859-2)))
84
85 (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
86 (define-coding-system-alias 'latin-2 'iso-latin-2)
87
88 (defun setup-latin2-environment ()
89 "Set up multilingual environment (MULE) for European Latin-2 users."
90 (interactive)
91 (set-language-environment "Laint-2"))
92
93 (set-language-info-alist
94 "Latin-2" '((charset ascii latin-iso8859-2)
95 (coding-system iso-latin-2)
96 (coding-priority iso-latin-2)
97 (nonascii-translation . latin-iso8859-2)
98 (unibyte-syntax . "latin-2")
99 (unibyte-display . iso-latin-2)
100 (input-method . "latin-2-prefix")
101 (documentation . "\
102 These languages are supported with the Latin-2 (ISO-8859-2) character set:
103 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
104 Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower),
105 and Swedish."))
106 '("European"))
107
108 \f
109 ;; Latin-3 (ISO-8859-3)
110
111 (make-coding-system
112 'iso-latin-3 2 ?3
113 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)"
114 '(ascii latin-iso8859-3 nil nil
115 nil nil nil nil nil nil nil)
116 '((safe-charsets ascii latin-iso8859-3)
117 (mime-charset . iso-8859-3)))
118
119 (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
120 (define-coding-system-alias 'latin-3 'iso-latin-3)
121
122 (defun setup-latin3-environment ()
123 "Set up multilingual environment (MULE) for European Latin-3 users."
124 (interactive)
125 (set-language-environment "Latin-3"))
126
127 (set-language-info-alist
128 "Latin-3" '((charset ascii latin-iso8859-3)
129 (coding-system iso-latin-3)
130 (coding-priority iso-latin-3)
131 (nonascii-translation . latin-iso8859-3)
132 (unibyte-syntax . "latin-3")
133 (unibyte-display . iso-latin-3)
134 (input-method . "latin-3-prefix")
135 (documentation . "\
136 These languages are supported with the Latin-3 (ISO-8859-3) character set:
137 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
138 German, Italian, Maltese, Spanish, and Turkish."))
139 '("European"))
140
141 \f
142 ;; Latin-4 (ISO-8859-4)
143
144 (make-coding-system
145 'iso-latin-4 2 ?4
146 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)"
147 '(ascii latin-iso8859-4 nil nil
148 nil nil nil nil nil nil nil)
149 '((safe-charsets ascii latin-iso8859-4)
150 (mime-charset . iso-8895-4)))
151
152 (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
153 (define-coding-system-alias 'latin-4 'iso-latin-4)
154
155 (defun setup-latin4-environment ()
156 "Set up multilingual environment (MULE) for European Latin-4 users."
157 (interactive)
158 (set-language-environment "Latin-4"))
159
160 (set-language-info-alist
161 "Latin-4" '((charset ascii latin-iso8859-4)
162 (coding-system iso-8859-4)
163 (coding-priority iso-8859-4)
164 (nonascii-translation . latin-iso8859-4)
165 (unibyte-syntax . "latin-4")
166 (unibyte-display . iso-8859-4)
167 (input-method . "latin-4-prefix")
168 (documentation . "\
169 These languages are supported with the Latin-4 (ISO-8859-4) character set:
170 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
171 Latvian, Lithuanian, and Norwegian."))
172 '("European"))
173
174 \f
175 ;; Latin-5 (ISO-8859-9)
176
177 (make-coding-system
178 'iso-latin-5 2 ?9
179 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)"
180 '(ascii latin-iso8859-9 nil nil
181 nil nil nil nil nil nil nil)
182 '((safe-charsets ascii latin-iso8859-9)
183 (mime-charset . iso-8859-9)))
184
185 (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
186 (define-coding-system-alias 'latin-5 'iso-latin-5)
187
188 (defun setup-latin5-environment ()
189 "Set up multilingual environment (MULE) for European Latin-5 users."
190 (interactive)
191 (set-language-environment "Latin-5"))
192
193 (set-language-info-alist
194 "Latin-5" '((charset ascii latin-iso8859-9)
195 (coding-system iso-latin-5)
196 (coding-priority iso-latin-5)
197 (nonascii-translation . latin-iso8859-9)
198 (unibyte-syntax . "latin-5")
199 (unibyte-display . iso-latin-5)
200 (input-method . "latin-5-prefix")
201 (documentation . "\
202 These languages are supported with the Latin-5 (ISO-8859-9) character set."))
203 '("European"))
204
205 \f
206 (defun setup-german-environment ()
207 "Set up multilingual environment (MULE) for German users."
208 (interactive)
209 (set-language-environment "German"))
210
211 (set-language-info-alist
212 "German" '((tutorial . "TUTORIAL.de")
213 (charset ascii latin-iso8859-1)
214 (coding-system iso-latin-1)
215 (coding-priority iso-latin-1)
216 (input-method . "german-postfix")
217 (nonascii-translation . iso-latin-1)
218 (unibyte-syntax . "latin-1")
219 (unibyte-display . iso-latin-1)
220 (sample-text . "\
221 German (Deutsch Nord) Guten Tag
222 German (Deutsch S\e,A|\e(Bd) Gr\e,A|_\e(B Gott")
223 (documentation . "\
224 This language environment is almost the same as Latin-1,
225 but default input method is set to \"german-postfix\"."))
226 '("European"))
227
228 ;;; european.el ends here