1 ;;; european.el --- Support for European languages
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 XEmacs.
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)
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.
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
28 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported.
32 ;; For syntax of Latin-1 characters.
33 (loop for c from 64 to 127 ; from '
\e,A@
\e(B' to '
\e,A
\7f\e(B'
34 do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w"))
36 (modify-syntax-entry (make-char 'latin-iso8859-1 32) "w") ; no-break space
37 (modify-syntax-entry ?
\e,AW
\e(B "_")
38 (modify-syntax-entry ?
\e,Aw
\e(B "_")
40 ;; For syntax of Latin-2
41 (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)
42 do (modify-syntax-entry c "w"))
44 (loop for c from 62 to 126
45 do (modify-syntax-entry (make-char 'latin-iso8859-2 c) "w"))
47 (modify-syntax-entry (make-char 'latin-iso8859-2 32) "w") ; no-break space
48 (modify-syntax-entry ?
\e,BW
\e(B ".")
49 (modify-syntax-entry ?
\e,Bw
\e(B ".")
51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
53 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
55 ;; (define-prefix-command 'describe-european-environment-map)
56 ;; (define-key-after describe-language-environment-map [European]
57 ;; '("European" . describe-european-environment-map)
60 ;; (define-prefix-command 'setup-european-environment-map)
61 ;; (define-key-after setup-language-environment-map [European]
62 ;; '("European" . setup-european-environment-map)
65 ;; Setup for LANGAUGE which uses one-byte 8-bit CHARSET, one-byte
66 ;; 8-bit CODING-SYSTEM, and INPUT-METHOD.
67 (defun setup-8-bit-environment (language charset coding-system input-method)
68 (setup-english-environment)
69 (set-default-coding-systems coding-system)
70 ;; (setq coding-category-iso-8-1 coding-system
71 ;; coding-category-iso-8-2 coding-system)
72 (set-coding-category-system 'iso-8-1 coding-system)
73 (set-coding-category-system 'iso-8-2 coding-system)
76 ;; (let ((nonascii-offset (- (make-char charset) 128)))
77 ;; ;; Set up for insertion of characters in this character set
78 ;; ;; when codes 0200 - 0377 are typed in.
79 ;; (setq nonascii-insert-offset nonascii-offset)))
82 (setq default-input-method input-method))
84 ;; If this is a Latin-N character set, set up syntax for it in
85 ;; single-byte mode. We can't use require because the file
86 ;; must be eval'd each time in case we change from one Latin-N to another.
87 ;; (if (string-match "^Latin-\\([1-9]\\)$" language)
88 ;; (load (downcase language) nil t))
91 ;; Latin-1 (ISO-8859-1)
93 ;; (make-coding-system
95 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-1, Compound Text Encoding)"
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))
99 ;; (define-coding-system-alias 'iso-8859-1 'iso-latin-1)
100 ;; (define-coding-system-alias 'latin-1 'iso-latin-1)
101 ;; (define-coding-system-alias 'ctext 'iso-latin-1)
103 (defun setup-latin1-environment ()
104 "Set up multilingual environment (MULE) for European Latin-1 users."
106 (setup-8-bit-environment "Latin-1" 'latin-iso8859-1 'iso-8859-1
109 (set-language-info-alist
110 "Latin-1" '((setup-function . (setup-latin1-environment
111 . setup-european-environment-map))
112 (charset . (ascii latin-iso8859-1))
113 (coding-system . (iso-8859-1))
115 . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
117 These languages are supported with the Latin-1 (ISO-8859-1) character set:
118 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
119 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
120 " . describe-european-environment-map))
123 (set-language-info-alist
124 "German" '((setup-function . (setup-latin1-environment
125 . setup-european-environment-map))
126 (charset . (ascii latin-iso8859-1))
127 (coding-system . (iso-8859-1))
128 (tutorial . "TUTORIAL.de")
130 . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
132 These languages are supported with the Latin-1 (ISO-8859-1) character set:
133 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
134 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
135 " . describe-european-environment-map))
138 (set-language-info-alist
139 "French" '((setup-function . (setup-latin1-environment
140 . setup-european-environment-map))
141 (charset . (ascii latin-iso8859-1))
142 (coding-system . (iso-8859-1))
143 (tutorial . "TUTORIAL.fr")
145 . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
147 These languages are supported with the Latin-1 (ISO-8859-1) character set:
148 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
149 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
150 " . describe-european-environment-map))
153 (set-language-info-alist
154 "Norwegian" '((setup-function . (setup-latin1-environment
155 . setup-european-environment-map))
156 (charset . (ascii latin-iso8859-1))
157 (coding-system . (iso-8859-1))
158 (tutorial . "TUTORIAL.no")
160 . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
162 These languages are supported with the Latin-1 (ISO-8859-1) character set:
163 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
164 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
165 " . describe-european-environment-map))
168 ;; Latin-2 (ISO-8859-2)
170 ;; (make-coding-system
172 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)"
173 ;; '((ascii t) (latin-iso8859-2 t) nil nil
174 ;; nil ascii-eol ascii-cntl nil nil nil nil))
176 ;; (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
177 ;; (define-coding-system-alias 'latin-2 'iso-latin-2)
180 'iso-8859-2 'iso2022 "MIME ISO-8859-2"
182 charset-g1 latin-iso8859-2
185 mnemonic "MIME/Ltn-2"
188 (defun setup-latin2-environment ()
189 "Set up multilingual environment (MULE) for European Latin-2 users."
191 (setup-8-bit-environment "Latin-2" 'latin-iso8859-2 'iso-8859-2
194 (set-language-info-alist
195 "Latin-2" '((setup-function . (setup-latin2-environment
196 . setup-european-environment-map))
197 (charset . (ascii latin-iso8859-2))
198 (coding-system . (iso-8859-2))
200 These languages are supported with the Latin-2 (ISO-8859-2) character set:
201 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
202 Serbian, Croatian, Slovak, Slovene, and Swedish.
203 " . describe-european-environment-map))
206 (set-language-info-alist
207 "Croatian" '((setup-function . (setup-latin2-environment
208 . setup-european-environment-map))
209 (charset . (ascii latin-iso8859-2))
210 (tutorial . "TUTORIAL.hr")
211 (coding-system . (iso-8859-2))
213 These languages are supported with the Latin-2 (ISO-8859-2) character set:
214 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
215 Serbian, Croatian, Slovak, Slovene, and Swedish.
216 " . describe-european-environment-map))
219 (set-language-info-alist
220 "Polish" '((setup-function . (setup-latin2-environment
221 . setup-european-environment-map))
222 (charset . (ascii latin-iso8859-2))
223 (tutorial . "TUTORIAL.pl")
224 (coding-system . (iso-8859-2))
226 These languages are supported with the Latin-2 (ISO-8859-2) character set:
227 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
228 Serbian, Croatian, Slovak, Slovene, and Swedish.
229 " . describe-european-environment-map))
232 ;; Romanian support originally from romanian.el
234 (defun setup-romanian-environment ()
235 "Setup multilingual environment (MULE) for Romanian."
237 (setup-8-bit-environment "Romanian" 'latin-iso8859-2 'iso-8859-2
240 (set-language-info-alist
241 "Romanian" '((setup-function . (setup-romanian-environment
242 . setup-european-environment-map))
243 (charset . (ascii latin-iso8859-2))
244 (tutorial . "TUTORIAL.ro")
245 (coding-system . (iso-8859-2))
247 These languages are supported with the Latin-2 (ISO-8859-2) character set:
248 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
249 Serbian, Croatian, Slovak, Slovene, and Swedish.
250 " . describe-european-environment-map))
253 ;; Czech support originally from czech.el
254 ;; Author: Milan Zamazal <pdm@fi.muni.cz>
255 ;; Maintainer(for XEmacs): David Sauer <davids@penguin.cz>
257 (defun setup-czech-environment ()
258 "Set up multilingual environment (MULE) for czech users."
260 (setup-8-bit-environment "Czech" 'latin-iso8859-2 'iso-8859-2
264 (set-language-info-alist
266 '((setup-function . (setup-czech-environment
267 . setup-european-environment-map))
268 (charset . (ascii latin-iso8859-2))
269 (coding-system . (iso-8859-2))
270 (tutorial . "TUTORIAL.cs")
272 These languages are supported with the Latin-2 (ISO-8859-2) character set:
273 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
274 Serbian, Croatian, Slovak, Slovene, and Swedish.
275 " . describe-european-environment-map))
280 ;; Latin-3 (ISO-8859-3)
282 ;; (make-coding-system
284 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)"
285 ;; '((ascii t) (latin-iso8859-3 t) nil nil
286 ;; nil ascii-eol ascii-cntl nil nil nil nil))
288 ;; (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
289 ;; (define-coding-system-alias 'latin-3 'iso-latin-3)
292 'iso-8859-3 'iso2022 "MIME ISO-8859-3"
294 charset-g1 latin-iso8859-3
297 mnemonic "MIME/Ltn-3"
300 (defun setup-latin3-environment ()
301 "Set up multilingual environment (MULE) for European Latin-3 users."
303 (setup-8-bit-environment "Latin-3" 'latin-iso8859-3 'iso-8859-3
306 (set-language-info-alist
307 "Latin-3" '((setup-function . (setup-latin3-environment
308 . setup-european-environment-map))
309 (charset . (ascii latin-iso8859-3))
310 (coding-system . (iso-8859-3))
312 These languages are supported with the Latin-3 (ISO-8859-3) character set:
313 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
314 German, Italian, Maltese, Spanish, and Turkish.
315 " . describe-european-environment-map))
318 ;; Latin-4 (ISO-8859-4)
320 ;; (make-coding-system
322 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)"
323 ;; '((ascii t) (latin-iso8859-4 t) nil nil
324 ;; nil ascii-eol ascii-cntl nil nil nil nil))
326 ;; (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
327 ;; (define-coding-system-alias 'latin-4 'iso-latin-4)
330 'iso-8859-4 'iso2022 "MIME ISO-8859-4"
332 charset-g1 latin-iso8859-4
335 mnemonic "MIME/Ltn-4"
338 (defun setup-latin4-environment ()
339 "Set up multilingual environment (MULE) for European Latin-4 users."
341 (setup-8-bit-environment "Latin-4" 'latin-iso8859-4 'iso-8859-4
344 (set-language-info-alist
345 "Latin-4" '((setup-function . (setup-latin4-environment
346 . setup-european-environment-map))
347 (charset . (ascii latin-iso8859-4))
348 (coding-system . (iso-8859-4))
350 These languages are supported with the Latin-4 (ISO-8859-4) character set:
351 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
352 Latvian, Lithuanian, and Norwegian.
353 " . describe-european-environment-map))
356 ;; Latin-5 (ISO-8859-9)
358 ;; (make-coding-system
360 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)"
361 ;; '((ascii t) (latin-iso8859-9 t) nil nil
362 ;; nil ascii-eol ascii-cntl nil nil nil nil))
364 ;; (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
365 ;; (define-coding-system-alias 'latin-5 'iso-latin-5)
368 'iso-8859-9 'iso2022 "MIME ISO-8859-9"
370 charset-g1 latin-iso8859-9
373 mnemonic "MIME/Ltn-5"
376 (defun setup-latin5-environment ()
377 "Set up multilingual environment (MULE) for European Latin-5 users."
379 (setup-8-bit-environment "Latin-5" 'latin-iso8859-9 'iso-8859-5
382 (set-language-info-alist
383 "Latin-5" '((setup-function . (setup-latin5-environment
384 . setup-european-environment-map))
385 (charset . (ascii latin-iso8859-9))
386 (coding-system . (iso-8859-5))
388 These languages are supported with the Latin-5 (ISO-8859-9) character set.
389 " . describe-european-environment-map))
392 ;; (defun setup-european-environment ()
393 ;; "Setup multilingual environment (MULE) for European languages users.
394 ;; It actually reset MULE to the default status, and
395 ;; set quail-latin-1 as the default input method to be selected.
396 ;; See also the documentation of setup-english-environment."
397 ;; (setup-english-environment)
398 ;; (setq default-input-method '("European" . "quail-latin-1")))
400 ;; (defun describe-european-support ()
401 ;; "Describe how Emacs support European languages."
403 ;; (describe-language-support-internal "European"))
405 ;; (set-language-info-alist
406 ;; "European" '((setup-function . setup-european-environment)
407 ;; (describe-function . describe-european-support)
408 ;; (charset . (ascii latin-iso8859-1 latin-iso8859-2
409 ;; latin-iso8859-3 latin-iso8859-4 latin-iso8859-9))
410 ;; (coding-system . (iso-8859-1 iso-8859-2 iso-8859-3
411 ;; iso-8859-4 iso-8859-9))
413 ;; . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
414 ;; (documentation . "\
415 ;; Almost all of European languages are supported by the character sets and
416 ;; coding systems listed below.
417 ;; To input them, LEIM (Libraries for Emacs Input Methods) should have been
421 ;;; european.el ends here