1 ;;; european.el --- European languages -*- coding: iso-2022-7bit; -*-
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 1997 MORIOKA Tomohiko
7 ;; Keywords: multilingual, European
9 ;; This file is part of SXEmacs.
11 ;; SXEmacs is free software: you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
16 ;; SXEmacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
26 ;; For Europeans, six coded character sets ISO8859-1,2,3,4,9 are supported.
27 ;; Note: ISO 8859/15 (Latin-9) is supported via the latin-unity package.
29 ;; #### latin.el would be a better name for this file.
33 ;; For syntax of Latin-1 characters.
34 (loop for c from 64 to 127 ; from '
\e,A@
\e(B' to '
\e,A
\7f\e(B'
35 do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w"))
37 (modify-syntax-entry (make-char 'latin-iso8859-1 32) "w") ; no-break space
38 (modify-syntax-entry ?
\e,AW
\e(B "_")
39 (modify-syntax-entry ?
\e,Aw
\e(B "_")
41 ;; For syntax of Latin-2
42 (loop for c in '(?
\e,B!
\e(B ?
\e,B#
\e(B ?
\e,B%
\e(B ?
\e,B&
\e(B ?
\e,B)
\e(B ?
\e,B*
\e(B ?
\e,B+
\e(B ?
\e,B,
\e(B ?
\e,B.
\e(B ?
\e,B/
\e(B ?
\e,B1
\e(B ?
\e,B3
\e(B ?
\e,B5
\e(B ?
\e,B6
\e(B ?
\e,B9
\e(B ?
\e,B:
\e(B ?
\e,B;
\e(B ?
\e,B<
\e(B)
43 do (modify-syntax-entry c "w"))
45 (loop for c from 62 to 126
46 do (modify-syntax-entry (make-char 'latin-iso8859-2 c) "w"))
48 (modify-syntax-entry (make-char 'latin-iso8859-2 32) "w") ; no-break space
49 (modify-syntax-entry ?
\e,BW
\e(B ".")
50 (modify-syntax-entry ?
\e,Bw
\e(B ".")
52 ;; For syntax of Latin-3
53 (loop for c in '(?
\e,C!
\e(B ?
\e,C&
\e(B ?
\e,C)
\e(B ?
\e,C*
\e(B ?
\e,C+
\e(B ?
\e,C,
\e(B ?
\e,C/
\e(B ?
\e,C1
\e(B ?
\e,C5
\e(B ?
\e,C6
\e(B ?
\e,C:
\e(B ?
\e,C;
\e(B ?
\e,C<
\e(B ?
\e,C?
\e(B)
54 do (modify-syntax-entry c "w"))
56 (loop for c from 64 to 126
57 do (modify-syntax-entry (make-char 'latin-iso8859-3 c) "w"))
59 (modify-syntax-entry (make-char 'latin-iso8859-3 32) "w") ; no-break space
60 (modify-syntax-entry ?
\e,CW
\e(B ".")
61 (modify-syntax-entry ?
\e,Cw
\e(B ".")
63 ;; For syntax of Latin-4
64 (loop for c in '(?
\e,D!
\e(B ?
\e,D"
\e(B ?
\e,D#
\e(B ?
\e,D%
\e(B ?
\e,D&
\e(B ?
\e,D)
\e(B ?
\e,D*
\e(B ?
\e,D+
\e(B ?
\e,D,
\e(B ?
\e,D.
\e(B ?
\e,D1
\e(B ?
\e,D3
\e(B ?
\e,D5
\e(B ?
\e,D6
\e(B ?
\e,D9
\e(B ?
\e,D:
\e(B ?
\e,D;
\e(B ?
\e,D<
\e(B ?
\e,D=
\e(B ?
\e,D>
\e(B ?
\e,D?
\e(B)
65 do (modify-syntax-entry c "w"))
67 (loop for c from 64 to 126
68 do (modify-syntax-entry (make-char 'latin-iso8859-4 c) "w"))
70 (modify-syntax-entry (make-char 'latin-iso8859-4 32) "w") ; no-break space
71 (modify-syntax-entry ?
\e,DW
\e(B ".")
72 (modify-syntax-entry ?
\e,Dw
\e(B ".")
75 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
77 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
80 ;; Latin-1 (ISO-8859-1)
82 ;; (make-coding-system
84 ;; "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)"
85 ;; '(ascii latin-iso8859-1 nil nil
86 ;; nil nil nil nil nil nil nil nil nil nil nil nil t)
87 ;; '((safe-charsets ascii latin-iso8859-1)
88 ;; (mime-charset . iso-8859-1)))
90 ;; (define-coding-system-alias 'iso-8859-1 'iso-latin-1)
91 ;; (define-coding-system-alias 'latin-1 'iso-latin-1)
93 ;; (make-coding-system
94 ;; 'compound-text 2 ?1
95 ;; "ISO 2022 based encoding used in inter client communication of X"
96 ;; '((ascii t) (latin-iso8859-1 t) nil nil
97 ;; nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil nil t)
98 ;; '((safe-charsets . t)))
100 ;; (define-coding-system-alias 'ctext 'compound-text)
102 (defun setup-latin1-environment ()
103 "Set up multilingual environment (MULE) for European Latin-1 users."
105 (set-language-environment "Latin-1"))
107 (set-language-info-alist
108 "Latin-1" '((charset ascii latin-iso8859-1)
109 (coding-system iso-8859-1)
110 (coding-priority iso-8859-1)
111 (input-method . "latin-1-prefix")
113 . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
114 (documentation . "This language environment is a generic one for Latin-1 (ISO-8859-1)
115 character set which supports the following languages:
116 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
117 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
118 We also have a German specific language environment \"German\"."))
121 (set-language-info-alist
122 "French" '((charset ascii latin-iso8859-1)
123 (coding-system iso-8859-1)
124 (coding-priority iso-8859-1)
125 (tutorial . "TUTORIAL.fr")
127 . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
128 (documentation . ("These languages are supported with the Latin-1 (ISO-8859-1) character set:
129 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
130 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
134 (set-language-info-alist
135 "Norwegian" '((charset ascii latin-iso8859-1)
136 (coding-system iso-8859-1)
137 (coding-priority iso-8859-1)
138 (tutorial . "TUTORIAL.no")
140 . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
141 (documentation . ("These languages are supported with the Latin-1 (ISO-8859-1) character set:
142 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
143 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
148 ;; Latin-2 (ISO-8859-2)
150 ;; (make-coding-system
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)))
158 ;; (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
159 ;; (define-coding-system-alias 'latin-2 'iso-latin-2)
162 'iso-8859-2 'iso2022 "MIME ISO-8859-2"
164 charset-g1 latin-iso8859-2
167 mnemonic "MIME/Ltn-2"
170 (defun setup-latin2-environment ()
171 "Set up multilingual environment (MULE) for European Latin-2 users."
173 (set-language-environment "Latin-2"))
175 (set-language-info-alist
176 "Latin-2" '((charset ascii latin-iso8859-2)
177 (coding-system iso-8859-2)
178 (coding-priority iso-8859-2)
179 (input-method . "latin-2-prefix")
180 (documentation . "This language environment is a generic one for Latin-2 (ISO-8859-2)
181 character set which supports the following languages:
182 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
183 Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower),
187 (set-language-info-alist
188 "Croatian" '((charset ascii latin-iso8859-2)
189 (coding-system iso-8859-2)
190 (coding-priority iso-8859-2)
191 (tutorial . "TUTORIAL.hr")
192 (documentation . "This language environment is a generic one for Latin-2 (ISO-8859-2)
193 character set which supports the following languages:
194 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
195 Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower),
199 (set-language-info-alist
200 "Polish" '((charset ascii latin-iso8859-2)
201 (coding-system iso-8859-2)
202 (coding-priority iso-8859-2)
203 (tutorial . "TUTORIAL.pl")
204 (documentation . "This language environment is a generic one for Latin-2 (ISO-8859-2)
205 character set which supports the following languages:
206 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
207 Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower),
211 ;; Romanian support originally from romanian.el
213 (defun setup-romanian-environment ()
214 "Setup multilingual environment (MULE) for Romanian."
216 (set-language-environment "Romanian"))
218 (set-language-info-alist
219 "Romanian" '((charset ascii latin-iso8859-2)
220 (coding-system iso-8859-2)
221 (coding-priority iso-8859-2)
222 (input-method . "latin-2-postfix")
223 (tutorial . "TUTORIAL.ro")
224 (sample-text . "Bun
\e,Bc
\e(B ziua, bine a
\e,B~
\e(Bi venit!")
230 ;; Czech support originally from czech.el
231 ;; Author: Milan Zamazal <pdm@fi.muni.cz>
232 ;; Maintainer(for XEmacs): David Sauer <davids@penguin.cz>
234 (defun setup-czech-environment ()
235 "Set up multilingual environment (MULE) for czech users."
237 (set-language-environment "Czech"))
239 (set-language-info-alist
240 "Czech" '((charset ascii latin-iso8859-2)
241 (coding-system iso-8859-2)
242 (coding-priority iso-8859-2)
243 (tutorial . "TUTORIAL.cs")
244 (sample-text . "P
\e,Bx
\e(Bejeme v
\e,Ba
\e(Bm hezk
\e,B}
\e(B den!")
251 ;; Latin-3 (ISO-8859-3)
253 ;; (make-coding-system
255 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)"
256 ;; '(ascii latin-iso8859-3 nil nil
257 ;; nil nil nil nil nil nil nil)
258 ;; '((safe-charsets ascii latin-iso8859-3)
259 ;; (mime-charset . iso-8859-3)))
261 ;; (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
262 ;; (define-coding-system-alias 'latin-3 'iso-latin-3)
265 'iso-8859-3 'iso2022 "MIME ISO-8859-3"
267 charset-g1 latin-iso8859-3
270 mnemonic "MIME/Ltn-3"
273 (defun setup-latin3-environment ()
274 "Set up multilingual environment (MULE) for European Latin-3 users."
276 (set-language-environment "Latin-3"))
278 (set-language-info-alist
279 "Latin-3" '((charset ascii latin-iso8859-3)
280 (coding-system iso-8859-3)
281 (coding-priority iso-8859-3)
282 (input-method . "latin-3-prefix")
283 (documentation . "These languages are supported with the Latin-3 (ISO-8859-3) character set:
284 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
285 German, Italian, Maltese, Spanish, and Turkish."))
289 ;; Latin-4 (ISO-8859-4)
291 ;; (make-coding-system
293 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)"
294 ;; '(ascii latin-iso8859-4 nil nil
295 ;; nil nil nil nil nil nil nil)
296 ;; '((safe-charsets ascii latin-iso8859-4)
297 ;; (mime-charset . iso-8895-4)))
299 ;; (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
300 ;; (define-coding-system-alias 'latin-4 'iso-latin-4)
303 'iso-8859-4 'iso2022 "MIME ISO-8859-4"
305 charset-g1 latin-iso8859-4
308 mnemonic "MIME/Ltn-4"
311 (defun setup-latin4-environment ()
312 "Set up multilingual environment (MULE) for European Latin-4 users."
314 (set-language-environment "Latin-4"))
316 (set-language-info-alist
317 "Latin-4" '((charset ascii latin-iso8859-4)
318 (coding-system iso-8859-4)
319 (coding-priority iso-8859-4)
320 (input-method . "latin-4-prefix")
321 (documentation . "These languages are supported with the Latin-4 (ISO-8859-4) character set:
322 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
323 Latvian, Lithuanian, and Norwegian."))
327 ;; Latin-5 (ISO-8859-9)
329 ;; (make-coding-system
331 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)"
332 ;; '(ascii latin-iso8859-9 nil nil
333 ;; nil nil nil nil nil nil nil)
334 ;; '((safe-charsets ascii latin-iso8859-9)
335 ;; (mime-charset . iso-8859-9)))
337 ;; (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
338 ;; (define-coding-system-alias 'latin-5 'iso-latin-5)
341 'iso-8859-9 'iso2022 "MIME ISO-8859-9"
343 charset-g1 latin-iso8859-9
346 mnemonic "MIME/Ltn-5"
349 (defun setup-latin5-environment ()
350 "Set up multilingual environment (MULE) for European Latin-5 users."
352 (set-language-environment "Latin-5"))
354 (set-language-info-alist
355 "Latin-5" '((charset ascii latin-iso8859-9)
356 (coding-system iso-8859-9)
357 (coding-priority iso-8859-9)
358 (input-method . "latin-5-prefix")
359 (documentation . "These languages are supported with the Latin-5 (ISO-8859-9) character set."))
363 (defun setup-german-environment ()
364 "Set up multilingual environment (MULE) for German users."
366 (set-language-environment "German"))
368 (set-language-info-alist
369 "German" '((tutorial . "TUTORIAL.de")
370 (charset ascii latin-iso8859-1)
371 (coding-system iso-8859-1)
372 (coding-priority iso-8859-1)
373 (input-method . "german-postfix")
374 (sample-text . "German (Deutsch Nord) Guten Tag
375 German (Deutsch S
\e,A|
\e(Bd) Gr
\e,A|_
\e(B Gott")
376 (documentation . "This language environment is almost the same as Latin-1,
377 but default input method is set to \"german-postfix\"."))
380 (defun setup-slovenian-environment ()
381 "Setup multilingual environment (MULE) for Slovenian."
383 (set-language-environment "Slovenian"))
385 (set-language-info-alist
386 "Slovenian" '((charset . (ascii latin-iso8859-2))
387 (coding-system . (iso-8859-2))
388 (coding-priority . (iso-8859-2))
389 (input-method . "latin-2-postfix")
390 (tutorial . "TUTORIAL.sl")
391 (sample-text . "
\e,B.
\e(Belimo vam uspe
\e,B9
\e(Ben dan!")
397 ;;; european.el ends here