Mercurial > hg > xemacs-beta
comparison lisp/mule/european.el @ 428:3ecd8885ac67 r21-2-22
Import from CVS: tag r21-2-22
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:28:15 +0200 |
parents | |
children | 8de8e3f6228a |
comparison
equal
deleted
inserted
replaced
427:0a0253eac470 | 428:3ecd8885ac67 |
---|---|
1 ;;; european.el --- European languages -*- coding: iso-2022-7bit; -*- | |
2 | |
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | |
4 ;; Licensed to the Free Software Foundation. | |
5 ;; Copyright (C) 1997 MORIOKA Tomohiko | |
6 | |
7 ;; Keywords: multilingual, European | |
8 | |
9 ;; This file is part of XEmacs. | |
10 | |
11 ;; XEmacs is free software; you can redistribute it and/or modify it | |
12 ;; under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; XEmacs is distributed in the hope that it will be useful, but | |
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 ;; General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free | |
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
24 ;; 02111-1307, USA. | |
25 | |
26 ;;; Commentary: | |
27 | |
28 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported. | |
29 | |
30 ;;; Code: | |
31 | |
32 ;; For syntax of Latin-1 characters. | |
33 (loop for c from 64 to 127 ; from ',A@(B' to ',A(B' | |
34 do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w")) | |
35 | |
36 (modify-syntax-entry (make-char 'latin-iso8859-1 32) "w") ; no-break space | |
37 (modify-syntax-entry ?,AW(B "_") | |
38 (modify-syntax-entry ?,Aw(B "_") | |
39 | |
40 ;; For syntax of Latin-2 | |
41 (loop for c in '(?,B!(B ?,B#(B ?,B%(B ?,B&(B ?,B)(B ?,B*(B ?,B+(B ?,B,(B ?,B.(B ?,B/(B ?,B1(B ?,B3(B ?,B5(B ?,B6(B ?,B9(B ?,B:(B ?,B;(B ?,B<(B) | |
42 do (modify-syntax-entry c "w")) | |
43 | |
44 (loop for c from 62 to 126 | |
45 do (modify-syntax-entry (make-char 'latin-iso8859-2 c) "w")) | |
46 | |
47 (modify-syntax-entry (make-char 'latin-iso8859-2 32) "w") ; no-break space | |
48 (modify-syntax-entry ?,BW(B ".") | |
49 (modify-syntax-entry ?,Bw(B ".") | |
50 | |
51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
52 ;;; EUROPEANS | |
53 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
54 | |
55 | |
56 ;; Latin-1 (ISO-8859-1) | |
57 | |
58 ;; (make-coding-system | |
59 ;; 'iso-latin-1 2 ?1 | |
60 ;; "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)" | |
61 ;; '(ascii latin-iso8859-1 nil nil | |
62 ;; nil nil nil nil nil nil nil nil nil nil nil nil t) | |
63 ;; '((safe-charsets ascii latin-iso8859-1) | |
64 ;; (mime-charset . iso-8859-1))) | |
65 | |
66 ;; (define-coding-system-alias 'iso-8859-1 'iso-latin-1) | |
67 ;; (define-coding-system-alias 'latin-1 'iso-latin-1) | |
68 | |
69 ;; (make-coding-system | |
70 ;; 'compound-text 2 ?1 | |
71 ;; "ISO 2022 based encoding used in inter client communication of X" | |
72 ;; '((ascii t) (latin-iso8859-1 t) nil nil | |
73 ;; nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil nil t) | |
74 ;; '((safe-charsets . t))) | |
75 | |
76 ;; (define-coding-system-alias 'ctext 'compound-text) | |
77 | |
78 (defun setup-latin1-environment () | |
79 "Set up multilingual environment (MULE) for European Latin-1 users." | |
80 (interactive) | |
81 (set-language-environment "Latin-1")) | |
82 | |
83 (set-language-info-alist | |
84 "Latin-1" '((charset ascii latin-iso8859-1) | |
85 (coding-system iso-8859-1) | |
86 (coding-priority iso-8859-1) | |
87 (input-method . "latin-1-prefix") | |
88 (sample-text | |
89 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") | |
90 (documentation . "\ | |
91 This language environment is a generic one for Latin-1 (ISO-8859-1) | |
92 character set which supports the following languages: | |
93 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, | |
94 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. | |
95 We also have a German specific language environment \"German\".")) | |
96 '("European")) | |
97 | |
98 (set-language-info-alist | |
99 "French" '((charset ascii latin-iso8859-1) | |
100 (coding-system iso-8859-1) | |
101 (coding-priority iso-8859-1) | |
102 (tutorial . "TUTORIAL.fr") | |
103 (sample-text | |
104 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") | |
105 (documentation . ("\ | |
106 These languages are supported with the Latin-1 (ISO-8859-1) character set: | |
107 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, | |
108 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. | |
109 "))) | |
110 '("European")) | |
111 | |
112 (set-language-info-alist | |
113 "Norwegian" '((charset ascii latin-iso8859-1) | |
114 (coding-system iso-8859-1) | |
115 (coding-priority iso-8859-1) | |
116 (tutorial . "TUTORIAL.no") | |
117 (sample-text | |
118 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") | |
119 (documentation . ("\ | |
120 These languages are supported with the Latin-1 (ISO-8859-1) character set: | |
121 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, | |
122 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. | |
123 "))) | |
124 '("European")) | |
125 | |
126 | |
127 ;; Latin-2 (ISO-8859-2) | |
128 | |
129 ;; (make-coding-system | |
130 ;; 'iso-latin-2 2 ?2 | |
131 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)" | |
132 ;; '(ascii latin-iso8859-2 nil nil | |
133 ;; nil nil nil nil nil nil nil) | |
134 ;; '((safe-charsets ascii latin-iso8859-2) | |
135 ;; (mime-charset . iso-8859-2))) | |
136 | |
137 ;; (define-coding-system-alias 'iso-8859-2 'iso-latin-2) | |
138 ;; (define-coding-system-alias 'latin-2 'iso-latin-2) | |
139 | |
140 (make-coding-system | |
141 'iso-8859-2 'iso2022 "MIME ISO-8859-2" | |
142 '(charset-g0 ascii | |
143 charset-g1 latin-iso8859-2 | |
144 charset-g2 t | |
145 charset-g3 t | |
146 mnemonic "MIME/Ltn-2" | |
147 )) | |
148 | |
149 (defun setup-latin2-environment () | |
150 "Set up multilingual environment (MULE) for European Latin-2 users." | |
151 (interactive) | |
152 (set-language-environment "Latin-2")) | |
153 | |
154 (set-language-info-alist | |
155 "Latin-2" '((charset ascii latin-iso8859-2) | |
156 (coding-system iso-8859-2) | |
157 (coding-priority iso-8859-2) | |
158 (input-method . "latin-2-prefix") | |
159 (documentation . "\ | |
160 This language environment is a generic one for Latin-2 (ISO-8859-2) | |
161 character set which supports the following languages: | |
162 Albanian, Czech, English, German, Hungarian, Polish, Romanian, | |
163 Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower), | |
164 and Swedish.")) | |
165 '("European")) | |
166 | |
167 (set-language-info-alist | |
168 "Croatian" '((charset ascii latin-iso8859-2) | |
169 (coding-system iso-8859-2) | |
170 (coding-priority iso-8859-2) | |
171 (tutorial . "TUTORIAL.hr") | |
172 (documentation . "\ | |
173 This language environment is a generic one for Latin-2 (ISO-8859-2) | |
174 character set which supports the following languages: | |
175 Albanian, Czech, English, German, Hungarian, Polish, Romanian, | |
176 Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower), | |
177 and Swedish.")) | |
178 '("European")) | |
179 | |
180 (set-language-info-alist | |
181 "Polish" '((charset ascii latin-iso8859-2) | |
182 (coding-system iso-8859-2) | |
183 (coding-priority iso-8859-2) | |
184 (tutorial . "TUTORIAL.pl") | |
185 (documentation . "\ | |
186 This language environment is a generic one for Latin-2 (ISO-8859-2) | |
187 character set which supports the following languages: | |
188 Albanian, Czech, English, German, Hungarian, Polish, Romanian, | |
189 Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower), | |
190 and Swedish.")) | |
191 '("European")) | |
192 | |
193 ;; Romanian support originally from romanian.el | |
194 | |
195 (defun setup-romanian-environment () | |
196 "Setup multilingual environment (MULE) for Romanian." | |
197 (interactive) | |
198 (set-language-environment "Romanian")) | |
199 | |
200 (set-language-info-alist | |
201 "Romanian" '((charset ascii latin-iso8859-2) | |
202 (coding-system iso-8859-2) | |
203 (coding-priority iso-8859-2) | |
204 (input-method . "latin-2-postfix") | |
205 (tutorial . "TUTORIAL.ro") | |
206 (sample-text . "Bun,Bc(B ziua, bine a,B~(Bi venit!") | |
207 (documentation . t)) | |
208 '("European")) | |
209 | |
210 (provide 'romanian) | |
211 | |
212 ;; Czech support originally from czech.el | |
213 ;; Author: Milan Zamazal <pdm@fi.muni.cz> | |
214 ;; Maintainer(for XEmacs): David Sauer <davids@penguin.cz> | |
215 | |
216 (defun setup-czech-environment () | |
217 "Set up multilingual environment (MULE) for czech users." | |
218 (interactive) | |
219 (set-language-environment "Czech")) | |
220 | |
221 (set-language-info-alist | |
222 "Czech" '((charset ascii latin-iso8859-2) | |
223 (coding-system iso-8859-2) | |
224 (coding-priority iso-8859-2) | |
225 (tutorial . "TUTORIAL.cs") | |
226 (sample-text . "P,Bx(Bejeme v,Ba(Bm hezk,B}(B den!") | |
227 (documentation . t)) | |
228 '("European")) | |
229 | |
230 (provide 'czech) | |
231 | |
232 | |
233 ;; Latin-3 (ISO-8859-3) | |
234 | |
235 ;; (make-coding-system | |
236 ;; 'iso-latin-3 2 ?3 | |
237 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)" | |
238 ;; '(ascii latin-iso8859-3 nil nil | |
239 ;; nil nil nil nil nil nil nil) | |
240 ;; '((safe-charsets ascii latin-iso8859-3) | |
241 ;; (mime-charset . iso-8859-3))) | |
242 | |
243 ;; (define-coding-system-alias 'iso-8859-3 'iso-latin-3) | |
244 ;; (define-coding-system-alias 'latin-3 'iso-latin-3) | |
245 | |
246 (make-coding-system | |
247 'iso-8859-3 'iso2022 "MIME ISO-8859-3" | |
248 '(charset-g0 ascii | |
249 charset-g1 latin-iso8859-3 | |
250 charset-g2 t | |
251 charset-g3 t | |
252 mnemonic "MIME/Ltn-3" | |
253 )) | |
254 | |
255 (defun setup-latin3-environment () | |
256 "Set up multilingual environment (MULE) for European Latin-3 users." | |
257 (interactive) | |
258 (set-language-environment "Latin-3")) | |
259 | |
260 (set-language-info-alist | |
261 "Latin-3" '((charset ascii latin-iso8859-3) | |
262 (coding-system iso-8859-3) | |
263 (coding-priority iso-8859-3) | |
264 (input-method . "latin-3-prefix") | |
265 (documentation . "\ | |
266 These languages are supported with the Latin-3 (ISO-8859-3) character set: | |
267 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician, | |
268 German, Italian, Maltese, Spanish, and Turkish.")) | |
269 '("European")) | |
270 | |
271 | |
272 ;; Latin-4 (ISO-8859-4) | |
273 | |
274 ;; (make-coding-system | |
275 ;; 'iso-latin-4 2 ?4 | |
276 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)" | |
277 ;; '(ascii latin-iso8859-4 nil nil | |
278 ;; nil nil nil nil nil nil nil) | |
279 ;; '((safe-charsets ascii latin-iso8859-4) | |
280 ;; (mime-charset . iso-8895-4))) | |
281 | |
282 ;; (define-coding-system-alias 'iso-8859-4 'iso-latin-4) | |
283 ;; (define-coding-system-alias 'latin-4 'iso-latin-4) | |
284 | |
285 (make-coding-system | |
286 'iso-8859-4 'iso2022 "MIME ISO-8859-4" | |
287 '(charset-g0 ascii | |
288 charset-g1 latin-iso8859-4 | |
289 charset-g2 t | |
290 charset-g3 t | |
291 mnemonic "MIME/Ltn-4" | |
292 )) | |
293 | |
294 (defun setup-latin4-environment () | |
295 "Set up multilingual environment (MULE) for European Latin-4 users." | |
296 (interactive) | |
297 (set-language-environment "Latin-4")) | |
298 | |
299 (set-language-info-alist | |
300 "Latin-4" '((charset ascii latin-iso8859-4) | |
301 (coding-system iso-8859-4) | |
302 (coding-priority iso-8859-4) | |
303 (input-method . "latin-4-prefix") | |
304 (documentation . "\ | |
305 These languages are supported with the Latin-4 (ISO-8859-4) character set: | |
306 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, | |
307 Latvian, Lithuanian, and Norwegian.")) | |
308 '("European")) | |
309 | |
310 | |
311 ;; Latin-5 (ISO-8859-9) | |
312 | |
313 ;; (make-coding-system | |
314 ;; 'iso-latin-5 2 ?9 | |
315 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)" | |
316 ;; '(ascii latin-iso8859-9 nil nil | |
317 ;; nil nil nil nil nil nil nil) | |
318 ;; '((safe-charsets ascii latin-iso8859-9) | |
319 ;; (mime-charset . iso-8859-9))) | |
320 | |
321 ;; (define-coding-system-alias 'iso-8859-9 'iso-latin-5) | |
322 ;; (define-coding-system-alias 'latin-5 'iso-latin-5) | |
323 | |
324 (make-coding-system | |
325 'iso-8859-9 'iso2022 "MIME ISO-8859-9" | |
326 '(charset-g0 ascii | |
327 charset-g1 latin-iso8859-9 | |
328 charset-g2 t | |
329 charset-g3 t | |
330 mnemonic "MIME/Ltn-5" | |
331 )) | |
332 | |
333 (defun setup-latin5-environment () | |
334 "Set up multilingual environment (MULE) for European Latin-5 users." | |
335 (interactive) | |
336 (set-language-environment "Latin-5")) | |
337 | |
338 (set-language-info-alist | |
339 "Latin-5" '((charset ascii latin-iso8859-9) | |
340 (coding-system iso-8859-9) | |
341 (coding-priority iso-8859-9) | |
342 (input-method . "latin-5-prefix") | |
343 (documentation . "\ | |
344 These languages are supported with the Latin-5 (ISO-8859-9) character set.")) | |
345 '("European")) | |
346 | |
347 | |
348 (defun setup-german-environment () | |
349 "Set up multilingual environment (MULE) for German users." | |
350 (interactive) | |
351 (set-language-environment "German")) | |
352 | |
353 (set-language-info-alist | |
354 "German" '((tutorial . "TUTORIAL.de") | |
355 (charset ascii latin-iso8859-1) | |
356 (coding-system iso-8859-1) | |
357 (coding-priority iso-8859-1) | |
358 (input-method . "german-postfix") | |
359 (sample-text . "\ | |
360 German (Deutsch Nord) Guten Tag | |
361 German (Deutsch S,A|(Bd) Gr,A|_(B Gott") | |
362 (documentation . "\ | |
363 This language environment is almost the same as Latin-1, | |
364 but default input method is set to \"german-postfix\".")) | |
365 '("European")) | |
366 | |
367 (defun setup-slovenian-environment () | |
368 "Setup multilingual environment (MULE) for Slovenian." | |
369 (interactive) | |
370 (set-language-environment "Slovenian")) | |
371 | |
372 (set-language-info-alist | |
373 "Slovenian" '((charset . (ascii latin-iso8859-2)) | |
374 (coding-system . (iso-8859-2)) | |
375 (coding-priority . (iso-8859-2)) | |
376 (input-method . "latin-2-postfix") | |
377 (tutorial . "TUTORIAL.sl") | |
378 (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!") | |
379 (documentation . t)) | |
380 '("European")) | |
381 | |
382 (provide 'slovenian) | |
383 | |
384 ;;; european.el ends here |