428
|
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
|
771
|
6 ;; Copyright (C) 2001 Ben Wing.
|
728
|
7 ;; Copyright (C) 2002 Free Software Foundation
|
428
|
8
|
|
9 ;; Keywords: multilingual, European
|
|
10
|
|
11 ;; This file is part of XEmacs.
|
|
12
|
|
13 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
14 ;; 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 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
21 ;; General Public License for more details.
|
|
22
|
|
23 ;; You should have received a copy of the GNU General Public License
|
|
24 ;; along with XEmacs; see the file COPYING. If not, write to the Free
|
|
25 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
26 ;; 02111-1307, USA.
|
|
27
|
|
28 ;;; Commentary:
|
|
29
|
728
|
30 ;; Support six Latin coded character sets ISO8859-1,2,3,4,9,15.
|
428
|
31
|
440
|
32 ;; #### latin.el would be a better name for this file.
|
|
33
|
428
|
34 ;;; Code:
|
|
35
|
|
36 ;; For syntax of Latin-1 characters.
|
|
37 (loop for c from 64 to 127 ; from ',A@(B' to ',A(B'
|
|
38 do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w"))
|
|
39
|
|
40 (modify-syntax-entry (make-char 'latin-iso8859-1 32) "w") ; no-break space
|
|
41 (modify-syntax-entry ?,AW(B "_")
|
|
42 (modify-syntax-entry ?,Aw(B "_")
|
|
43
|
728
|
44 ;; For syntax of Latin-9 characters.
|
|
45 ;; Based on Latin-1 and differences from Jukka Korpela
|
|
46 ;; http://www.cs.tut.fi/~jkorpela/latin9.html
|
|
47 (loop for c in '(?,b&(B ?,b((B ?,b4(B ?,b8(B ?,b<(B ?,b=(B ?,b>(B)
|
|
48 do (modify-syntax-entry c "w"))
|
|
49
|
|
50 (loop for c from 64 to 127 ; from ',b@(B' to ',b(B'
|
|
51 do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w"))
|
|
52
|
|
53 (modify-syntax-entry (make-char 'latin-iso8859-15 32) "w") ; no-break space
|
|
54 (modify-syntax-entry ?,bW(B "_")
|
|
55 (modify-syntax-entry ?,bw(B "_")
|
|
56
|
428
|
57 ;; For syntax of Latin-2
|
|
58 (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)
|
|
59 do (modify-syntax-entry c "w"))
|
|
60
|
|
61 (loop for c from 62 to 126
|
|
62 do (modify-syntax-entry (make-char 'latin-iso8859-2 c) "w"))
|
|
63
|
|
64 (modify-syntax-entry (make-char 'latin-iso8859-2 32) "w") ; no-break space
|
|
65 (modify-syntax-entry ?,BW(B ".")
|
|
66 (modify-syntax-entry ?,Bw(B ".")
|
|
67
|
440
|
68 ;; For syntax of Latin-3
|
|
69 (loop for c in '(?,C!(B ?,C&(B ?,C)(B ?,C*(B ?,C+(B ?,C,(B ?,C/(B ?,C1(B ?,C5(B ?,C6(B ?,C:(B ?,C;(B ?,C<(B ?,C?(B)
|
|
70 do (modify-syntax-entry c "w"))
|
|
71
|
|
72 (loop for c from 64 to 126
|
|
73 do (modify-syntax-entry (make-char 'latin-iso8859-3 c) "w"))
|
|
74
|
|
75 (modify-syntax-entry (make-char 'latin-iso8859-3 32) "w") ; no-break space
|
|
76 (modify-syntax-entry ?,CW(B ".")
|
|
77 (modify-syntax-entry ?,Cw(B ".")
|
|
78
|
|
79 ;; For syntax of Latin-4
|
|
80 (loop for c in '(?,D!(B ?,D"(B ?,D#(B ?,D%(B ?,D&(B ?,D)(B ?,D*(B ?,D+(B ?,D,(B ?,D.(B ?,D1(B ?,D3(B ?,D5(B ?,D6(B ?,D9(B ?,D:(B ?,D;(B ?,D<(B ?,D=(B ?,D>(B ?,D?(B)
|
|
81 do (modify-syntax-entry c "w"))
|
|
82
|
|
83 (loop for c from 64 to 126
|
|
84 do (modify-syntax-entry (make-char 'latin-iso8859-4 c) "w"))
|
|
85
|
|
86 (modify-syntax-entry (make-char 'latin-iso8859-4 32) "w") ; no-break space
|
|
87 (modify-syntax-entry ?,DW(B ".")
|
|
88 (modify-syntax-entry ?,Dw(B ".")
|
|
89
|
|
90
|
428
|
91 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
92 ;;; EUROPEANS
|
|
93 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
94
|
|
95
|
|
96 ;; Latin-1 (ISO-8859-1)
|
|
97
|
|
98 ;; (make-coding-system
|
|
99 ;; 'iso-latin-1 2 ?1
|
|
100 ;; "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)"
|
|
101 ;; '(ascii latin-iso8859-1 nil nil
|
|
102 ;; nil nil nil nil nil nil nil nil nil nil nil nil t)
|
|
103 ;; '((safe-charsets ascii latin-iso8859-1)
|
|
104 ;; (mime-charset . iso-8859-1)))
|
|
105
|
|
106 ;; (define-coding-system-alias 'iso-8859-1 'iso-latin-1)
|
|
107 ;; (define-coding-system-alias 'latin-1 'iso-latin-1)
|
|
108
|
|
109 ;; (make-coding-system
|
|
110 ;; 'compound-text 2 ?1
|
|
111 ;; "ISO 2022 based encoding used in inter client communication of X"
|
|
112 ;; '((ascii t) (latin-iso8859-1 t) nil nil
|
|
113 ;; nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil nil t)
|
|
114 ;; '((safe-charsets . t)))
|
|
115
|
|
116 ;; (define-coding-system-alias 'ctext 'compound-text)
|
|
117
|
771
|
118 ;; "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!"
|
428
|
119
|
|
120
|
728
|
121 ;; Latin-9 (ISO-8859-15)
|
|
122 ;; Latin-1 plus Euro, plus a few accented characters
|
|
123
|
|
124 ;; (make-charset 'latin-iso8859-15
|
|
125 ;; "Latin-9, aka Latin-1 with Euro etc"
|
|
126 ;; '(short-name "Latin 9"
|
|
127 ;; long-name "Latin-9 (typically GR of ISO 8859/15)"
|
|
128 ;; registry "iso8859-15"
|
|
129 ;; dimension 1
|
|
130 ;; columns 1
|
|
131 ;; chars 96
|
|
132 ;; final ?b ; ISO-IR-203
|
|
133 ;; graphic 1
|
|
134 ;; direction l2r))
|
|
135
|
|
136 (make-coding-system
|
|
137 'iso-8859-15 'iso2022
|
|
138 "ISO 4873 conforming 8-bit code (ASCII + Latin 9; aka Latin-1 with Euro)"
|
|
139 `(mnemonic "MIME/Ltn-9" ; bletch
|
|
140 eol-type nil
|
|
141 charset-g0 ascii
|
|
142 charset-g1 latin-iso8859-15
|
|
143 charset-g2 t
|
|
144 charset-g3 t
|
|
145 ))
|
|
146
|
|
147
|
428
|
148 ;; Latin-2 (ISO-8859-2)
|
|
149
|
|
150 ;; (make-coding-system
|
|
151 ;; 'iso-latin-2 2 ?2
|
|
152 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)"
|
|
153 ;; '(ascii latin-iso8859-2 nil nil
|
|
154 ;; nil nil nil nil nil nil nil)
|
|
155 ;; '((safe-charsets ascii latin-iso8859-2)
|
|
156 ;; (mime-charset . iso-8859-2)))
|
|
157
|
|
158 ;; (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
|
|
159 ;; (define-coding-system-alias 'latin-2 'iso-latin-2)
|
|
160
|
|
161 (make-coding-system
|
771
|
162 'iso-8859-2 'iso2022 "ISO-8859-2 (Latin-2)"
|
428
|
163 '(charset-g0 ascii
|
|
164 charset-g1 latin-iso8859-2
|
|
165 charset-g2 t
|
|
166 charset-g3 t
|
|
167 mnemonic "MIME/Ltn-2"
|
|
168 ))
|
|
169
|
|
170 (provide 'romanian)
|
|
171
|
|
172 ;; Czech support originally from czech.el
|
|
173 ;; Author: Milan Zamazal <pdm@fi.muni.cz>
|
|
174 ;; Maintainer(for XEmacs): David Sauer <davids@penguin.cz>
|
|
175
|
771
|
176 (provide 'czech)
|
428
|
177
|
771
|
178 ;; Slovak support originally from slovak.el
|
|
179 ;; Authors: Tibor ,B)(Bimko <tibor.simko@fmph.uniba.sk>,
|
|
180 ;; Milan Zamazal <pdm@fi.muni.cz>
|
|
181 ;; Maintainer: Milan Zamazal <pdm@fi.muni.cz>
|
428
|
182
|
771
|
183 (provide 'slovenian)
|
428
|
184
|
|
185
|
|
186 ;; Latin-3 (ISO-8859-3)
|
|
187
|
|
188 ;; (make-coding-system
|
|
189 ;; 'iso-latin-3 2 ?3
|
|
190 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)"
|
|
191 ;; '(ascii latin-iso8859-3 nil nil
|
|
192 ;; nil nil nil nil nil nil nil)
|
|
193 ;; '((safe-charsets ascii latin-iso8859-3)
|
|
194 ;; (mime-charset . iso-8859-3)))
|
|
195
|
|
196 ;; (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
|
|
197 ;; (define-coding-system-alias 'latin-3 'iso-latin-3)
|
|
198
|
|
199 (make-coding-system
|
771
|
200 'iso-8859-3 'iso2022 "ISO-8859-3 (Latin-3)"
|
428
|
201 '(charset-g0 ascii
|
|
202 charset-g1 latin-iso8859-3
|
|
203 charset-g2 t
|
|
204 charset-g3 t
|
|
205 mnemonic "MIME/Ltn-3"
|
|
206 ))
|
|
207
|
|
208
|
|
209 ;; Latin-4 (ISO-8859-4)
|
|
210
|
|
211 ;; (make-coding-system
|
|
212 ;; 'iso-latin-4 2 ?4
|
|
213 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)"
|
|
214 ;; '(ascii latin-iso8859-4 nil nil
|
|
215 ;; nil nil nil nil nil nil nil)
|
|
216 ;; '((safe-charsets ascii latin-iso8859-4)
|
|
217 ;; (mime-charset . iso-8895-4)))
|
|
218
|
|
219 ;; (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
|
|
220 ;; (define-coding-system-alias 'latin-4 'iso-latin-4)
|
|
221
|
|
222 (make-coding-system
|
771
|
223 'iso-8859-4 'iso2022 "ISO-8859-4 (Latin-4)"
|
428
|
224 '(charset-g0 ascii
|
|
225 charset-g1 latin-iso8859-4
|
|
226 charset-g2 t
|
|
227 charset-g3 t
|
|
228 mnemonic "MIME/Ltn-4"
|
|
229 ))
|
|
230
|
|
231
|
|
232 ;; Latin-5 (ISO-8859-9)
|
|
233
|
|
234 ;; (make-coding-system
|
|
235 ;; 'iso-latin-5 2 ?9
|
|
236 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)"
|
|
237 ;; '(ascii latin-iso8859-9 nil nil
|
|
238 ;; nil nil nil nil nil nil nil)
|
|
239 ;; '((safe-charsets ascii latin-iso8859-9)
|
|
240 ;; (mime-charset . iso-8859-9)))
|
|
241
|
|
242 ;; (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
|
|
243 ;; (define-coding-system-alias 'latin-5 'iso-latin-5)
|
|
244
|
|
245 (make-coding-system
|
771
|
246 'iso-8859-9 'iso2022 "ISO-8859-9 (Latin-5)"
|
428
|
247 '(charset-g0 ascii
|
|
248 charset-g1 latin-iso8859-9
|
|
249 charset-g2 t
|
|
250 charset-g3 t
|
|
251 mnemonic "MIME/Ltn-5"
|
|
252 ))
|
|
253
|
771
|
254 (loop for ((charset codesys default-input nice-charset-1 nice-charset-2
|
|
255 supported-langs ;; a list if the doc string is replaced
|
|
256 ;; entirely
|
|
257 )
|
|
258 langenvs) in
|
|
259 '(
|
|
260 ((latin-iso8859-1 iso-8859-1 "latin-1-prefix" "Latin-1" "ISO-8859-1"
|
|
261 " Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
|
|
262 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.")
|
|
263 (("Danish" "da")
|
|
264 ("Dutch" "nl" "TUTORIAL.nl")
|
|
265 ("Faeroese")
|
|
266 ("Finnish" "fi")
|
|
267 ("French" "fr" "TUTORIAL.fr" "Bonjour, ,Ag(Ba va?")
|
|
268 ("German" "de" "TUTORIAL.de" "\
|
428
|
269 German (Deutsch Nord) Guten Tag
|
771
|
270 German (Deutsch S,A|(Bd) Gr,A|_(B Gott"
|
|
271 "german-postfix")
|
|
272 ("Icelandic" "is")
|
|
273 ("Irish" "ga")
|
|
274 ("Italian" "it")
|
|
275 ("Norwegian" "no" "TUTORIAL.no")
|
|
276 ("Portuguese" "pt" nil "Bem-vindo! Tudo bem?")
|
|
277 ("Spanish" "es" "TUTORIAL.es" ",A!(BHola!")
|
|
278 ("Swedish" "sv")))
|
|
279 ((latin-iso8859-15 iso-8859-15 "latin-1-prefix" ;; #### FIXME
|
|
280 "Latin-9" "ISO-8859-15"
|
|
281 ("\
|
|
282 This language environment is a generic one for Latin-9 (ISO-8859-15)
|
|
283 character set which supports the Euro sign and the following languages
|
|
284 (they use the Latin-1 character set by default):
|
|
285 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
|
|
286 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
|
|
287 Each also has its own specific language environment."))
|
|
288 ())
|
|
289 ((latin-iso8859-2 iso-8859-2 "latin-2-prefix" "Latin-2" "ISO-8859-2"
|
|
290 " Albanian, Czech, English, German, Hungarian, Polish, Romanian,
|
|
291 Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower),
|
|
292 and Swedish.")
|
|
293 (("Albanian" nil)
|
|
294 ("Croatian" ("hrvatski" "hr") "TUTORIAL.hr")
|
|
295 ("Czech" ("cs" "cz") "TUTORIAL.cs" "P,Bx(Bejeme v,Ba(Bm hezk,B}(B den!"
|
|
296 "latin-2-postfix")
|
|
297 ("Hungarian" ("hungarian" "hu"))
|
|
298 ("Polish" "po" "TUTORIAL.pl")
|
|
299 ("Romanian" "ro" "TUTORIAL.ro" "Bun,Bc(B ziua, bine a,B~(Bi venit!"
|
|
300 "latin-2-postfix")
|
|
301 ("Serbian" "sr")
|
|
302 ("Slovak" "sk" "TUTORIAL.sk" "Prajeme V,Ba(Bm pr,Bm(Bjemn,B}(B de,Br(B!"
|
|
303 ;; !!#### FSF "slovak"
|
|
304 "latin-2-postfix")
|
|
305 ("Slovenian" "sl" "TUTORIAL.sl" ",B.(Belimo vam uspe,B9(Ben dan!"
|
|
306 "latin-2-postfix")
|
|
307 ("Sorbian" nil)))
|
|
308 ((latin-iso8859-3 iso-8859-3 "latin-3-prefix" "Latin-3" "ISO-8859-3"
|
|
309 " Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
|
|
310 German, Italian, Maltese, Spanish, and Turkish.")
|
|
311 (("Afrikaans" "af")
|
|
312 ("Catalan" ("catalan" "ca"))
|
|
313 ("Esperanto")
|
|
314 ("Galician")
|
|
315 ("Maltese")))
|
|
316 ((latin-iso8859-4 iso-8859-4 "latin-4-prefix" "Latin-4" "ISO-8859-4"
|
|
317 " Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
|
|
318 Latvian, Lithuanian, and Norwegian.")
|
|
319 (("Estonian" "et")
|
|
320 ("Greenlandic")
|
|
321 ("Lappish")
|
|
322 ("Latvian" "lv")
|
|
323 ("Lithuanian" "li")))
|
|
324 ((latin-iso8859-5 iso-8859-9 "latin-5-prefix" "Latin-5" "ISO-8859-9")
|
|
325 (("Turkish" "tr"))))
|
|
326 do
|
|
327 (set-language-info-alist
|
|
328 nice-charset-1
|
|
329 `((charset ascii ,charset)
|
|
330 (coding-system ,codesys)
|
|
331 (coding-priority ,codesys)
|
|
332 (documentation . ,(if (listp supported-langs) (car supported-langs)
|
|
333 (format "\
|
|
334 This language environment is a generic one for %s (%s)
|
|
335 character set which supports the following languages (not all of them may
|
|
336 use this character set by default):
|
|
337 %s
|
|
338 Each also has its own specific language environment."
|
|
339 nice-charset-1 nice-charset-2
|
|
340 supported-langs))))
|
|
341 '("European"))
|
|
342 (loop for (name locale tutorial sample-text input-method) in langenvs
|
|
343 do
|
|
344 (set-language-info-alist
|
|
345 name
|
|
346 `((charset ascii ,charset)
|
|
347 (coding-system ,codesys)
|
|
348 (coding-priority ,codesys)
|
|
349 ,@(if locale `((locale . ,locale)))
|
|
350 ,@(if tutorial `((tutorial . ,tutorial)))
|
|
351 ,@(if sample-text `((sample-text . ,sample-text)))
|
|
352 (input-method . ,(or input-method default-input))
|
|
353 (documentation . ,(format "\
|
|
354 This language environment supports %s using the Latin-1 (ISO-8859-1)
|
|
355 character set. Languages supported by Latin-1 are Danish, Dutch, English,
|
|
356 Faeroese, Finnish, French, German, Icelandic, Irish, Italian, Norwegian,
|
|
357 Portuguese, Spanish, and Swedish. The various language environments for
|
|
358 these languages are similar to the Latin-1 environment, but typically have
|
|
359 their own locale specified (for subprocesses and for selection of the
|
|
360 correct language environment at startup), and may have their own tutorials
|
|
361 and/or a different input method."
|
|
362 name)))
|
|
363 '("European"))
|
|
364 ))
|
428
|
365
|
|
366 ;;; european.el ends here
|