comparison lisp/mule/european.el @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 74fd4e045ea6
children 95016f13131a
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
1 ;;; european.el --- European languages -*- coding: iso-2022-7bit; -*- 1 ;;; european.el --- Support for European languages
2 2
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation. 4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 1997 MORIOKA Tomohiko 5 ;; Copyright (C) 1997 MORIOKA Tomohiko
6 6
25 25
26 ;;; Commentary: 26 ;;; Commentary:
27 27
28 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported. 28 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported.
29 29
30 ;; #### latin.el would be a better name for this file.
31
32 ;;; Code: 30 ;;; Code:
33 31
34 ;; For syntax of Latin-1 characters. 32 ;; For syntax of Latin-1 characters.
35 (loop for c from 64 to 127 ; from ',A@(B' to ',A(B' 33 (loop for c from 64 to 127 ; from ',A@(B' to ',A(B'
36 do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w")) 34 do (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w"))
48 46
49 (modify-syntax-entry (make-char 'latin-iso8859-2 32) "w") ; no-break space 47 (modify-syntax-entry (make-char 'latin-iso8859-2 32) "w") ; no-break space
50 (modify-syntax-entry ?,BW(B ".") 48 (modify-syntax-entry ?,BW(B ".")
51 (modify-syntax-entry ?,Bw(B ".") 49 (modify-syntax-entry ?,Bw(B ".")
52 50
53 ;; For syntax of Latin-3
54 (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)
55 do (modify-syntax-entry c "w"))
56
57 (loop for c from 64 to 126
58 do (modify-syntax-entry (make-char 'latin-iso8859-3 c) "w"))
59
60 (modify-syntax-entry (make-char 'latin-iso8859-3 32) "w") ; no-break space
61 (modify-syntax-entry ?,CW(B ".")
62 (modify-syntax-entry ?,Cw(B ".")
63
64 ;; For syntax of Latin-4
65 (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)
66 do (modify-syntax-entry c "w"))
67
68 (loop for c from 64 to 126
69 do (modify-syntax-entry (make-char 'latin-iso8859-4 c) "w"))
70
71 (modify-syntax-entry (make-char 'latin-iso8859-4 32) "w") ; no-break space
72 (modify-syntax-entry ?,DW(B ".")
73 (modify-syntax-entry ?,Dw(B ".")
74
75
76 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
77 ;;; EUROPEANS 52 ;;; EUROPEANS
78 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 53 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
79 54
55 ;; (define-prefix-command 'describe-european-environment-map)
56 ;; (define-key-after describe-language-environment-map [European]
57 ;; '("European" . describe-european-environment-map)
58 ;; t)
59
60 ;; (define-prefix-command 'setup-european-environment-map)
61 ;; (define-key-after setup-language-environment-map [European]
62 ;; '("European" . setup-european-environment-map)
63 ;; t)
64
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)
74
75 ;; (if charset
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)))
80
81 (if input-method
82 (setq default-input-method input-method))
83
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))
89 )
80 90
81 ;; Latin-1 (ISO-8859-1) 91 ;; Latin-1 (ISO-8859-1)
82 92
83 ;; (make-coding-system 93 ;; (make-coding-system
84 ;; 'iso-latin-1 2 ?1 94 ;; 'iso-latin-1 2 ?1
85 ;; "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)" 95 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-1, Compound Text Encoding)"
86 ;; '(ascii latin-iso8859-1 nil nil 96 ;; '((ascii t) (latin-iso8859-1 t) nil nil
87 ;; nil nil nil nil nil nil nil nil nil nil nil nil t) 97 ;; nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil nil t))
88 ;; '((safe-charsets ascii latin-iso8859-1)
89 ;; (mime-charset . iso-8859-1)))
90 98
91 ;; (define-coding-system-alias 'iso-8859-1 'iso-latin-1) 99 ;; (define-coding-system-alias 'iso-8859-1 'iso-latin-1)
92 ;; (define-coding-system-alias 'latin-1 'iso-latin-1) 100 ;; (define-coding-system-alias 'latin-1 'iso-latin-1)
93 101 ;; (define-coding-system-alias 'ctext 'iso-latin-1)
94 ;; (make-coding-system
95 ;; 'compound-text 2 ?1
96 ;; "ISO 2022 based encoding used in inter client communication of X"
97 ;; '((ascii t) (latin-iso8859-1 t) nil nil
98 ;; nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil nil t)
99 ;; '((safe-charsets . t)))
100
101 ;; (define-coding-system-alias 'ctext 'compound-text)
102 102
103 (defun setup-latin1-environment () 103 (defun setup-latin1-environment ()
104 "Set up multilingual environment (MULE) for European Latin-1 users." 104 "Set up multilingual environment (MULE) for European Latin-1 users."
105 (interactive) 105 (interactive)
106 (set-language-environment "Latin-1")) 106 (setup-8-bit-environment "Latin-1" 'latin-iso8859-1 'iso-8859-1
107 107 "latin-1-prefix"))
108 (set-language-info-alist 108
109 "Latin-1" '((charset ascii latin-iso8859-1) 109 (set-language-info-alist
110 (coding-system iso-8859-1) 110 "Latin-1" '((setup-function . (setup-latin1-environment
111 (coding-priority iso-8859-1) 111 . setup-european-environment-map))
112 (input-method . "latin-1-prefix") 112 (charset . (ascii latin-iso8859-1))
113 (coding-system . (iso-8859-1))
113 (sample-text 114 (sample-text
114 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") 115 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
115 (documentation . "\ 116 (documentation . ("\
116 This language environment is a generic one for Latin-1 (ISO-8859-1)
117 character set which supports the following languages:
118 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
119 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
120 We also have a German specific language environment \"German\"."))
121 '("European"))
122
123 (set-language-info-alist
124 "French" '((charset ascii latin-iso8859-1)
125 (coding-system iso-8859-1)
126 (coding-priority iso-8859-1)
127 (tutorial . "TUTORIAL.fr")
128 (sample-text
129 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
130 (documentation . ("\
131 These languages are supported with the Latin-1 (ISO-8859-1) character set: 117 These languages are supported with the Latin-1 (ISO-8859-1) character set:
132 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, 118 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
133 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. 119 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
134 "))) 120 " . describe-european-environment-map))
135 '("European")) 121 ))
136 122
137 (set-language-info-alist 123 (set-language-info-alist
138 "Norwegian" '((charset ascii latin-iso8859-1) 124 "German" '((setup-function . (setup-latin1-environment
139 (coding-system iso-8859-1) 125 . setup-european-environment-map))
140 (coding-priority iso-8859-1) 126 (charset . (ascii latin-iso8859-1))
141 (tutorial . "TUTORIAL.no") 127 (coding-system . (iso-8859-1))
142 (sample-text 128 (tutorial . "TUTORIAL.de")
143 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") 129 (sample-text
144 (documentation . ("\ 130 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
131 (documentation . ("\
145 These languages are supported with the Latin-1 (ISO-8859-1) character set: 132 These languages are supported with the Latin-1 (ISO-8859-1) character set:
146 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, 133 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
147 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. 134 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
148 "))) 135 " . describe-european-environment-map))
149 '("European")) 136 ))
150 137
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")
144 (sample-text
145 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
146 (documentation . ("\
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))
151 ))
152
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")
159 (sample-text
160 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
161 (documentation . ("\
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))
166 ))
151 167
152 ;; Latin-2 (ISO-8859-2) 168 ;; Latin-2 (ISO-8859-2)
153 169
154 ;; (make-coding-system 170 ;; (make-coding-system
155 ;; 'iso-latin-2 2 ?2 171 ;; 'iso-latin-2 2 ?2
156 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)" 172 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)"
157 ;; '(ascii latin-iso8859-2 nil nil 173 ;; '((ascii t) (latin-iso8859-2 t) nil nil
158 ;; nil nil nil nil nil nil nil) 174 ;; nil ascii-eol ascii-cntl nil nil nil nil))
159 ;; '((safe-charsets ascii latin-iso8859-2)
160 ;; (mime-charset . iso-8859-2)))
161 175
162 ;; (define-coding-system-alias 'iso-8859-2 'iso-latin-2) 176 ;; (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
163 ;; (define-coding-system-alias 'latin-2 'iso-latin-2) 177 ;; (define-coding-system-alias 'latin-2 'iso-latin-2)
164 178
165 (make-coding-system 179 (make-coding-system
172 )) 186 ))
173 187
174 (defun setup-latin2-environment () 188 (defun setup-latin2-environment ()
175 "Set up multilingual environment (MULE) for European Latin-2 users." 189 "Set up multilingual environment (MULE) for European Latin-2 users."
176 (interactive) 190 (interactive)
177 (set-language-environment "Latin-2")) 191 (setup-8-bit-environment "Latin-2" 'latin-iso8859-2 'iso-8859-2
178 192 "latin-2-prefix"))
179 (set-language-info-alist 193
180 "Latin-2" '((charset ascii latin-iso8859-2) 194 (set-language-info-alist
181 (coding-system iso-8859-2) 195 "Latin-2" '((setup-function . (setup-latin2-environment
182 (coding-priority iso-8859-2) 196 . setup-european-environment-map))
183 (input-method . "latin-2-prefix") 197 (charset . (ascii latin-iso8859-2))
184 (documentation . "\ 198 (coding-system . (iso-8859-2))
185 This language environment is a generic one for Latin-2 (ISO-8859-2) 199 (documentation . ("\
186 character set which supports the following languages: 200 These languages are supported with the Latin-2 (ISO-8859-2) character set:
187 Albanian, Czech, English, German, Hungarian, Polish, Romanian, 201 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
188 Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower), 202 Serbian, Croatian, Slovak, Slovene, and Swedish.
189 and Swedish.")) 203 " . describe-european-environment-map))
190 '("European")) 204 ))
191 205
192 (set-language-info-alist 206 (set-language-info-alist
193 "Croatian" '((charset ascii latin-iso8859-2) 207 "Croatian" '((setup-function . (setup-latin2-environment
194 (coding-system iso-8859-2) 208 . setup-european-environment-map))
195 (coding-priority iso-8859-2) 209 (charset . (ascii latin-iso8859-2))
196 (tutorial . "TUTORIAL.hr") 210 (tutorial . "TUTORIAL.hr")
197 (documentation . "\ 211 (coding-system . (iso-8859-2))
198 This language environment is a generic one for Latin-2 (ISO-8859-2) 212 (documentation . ("\
199 character set which supports the following languages: 213 These languages are supported with the Latin-2 (ISO-8859-2) character set:
200 Albanian, Czech, English, German, Hungarian, Polish, Romanian, 214 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
201 Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower), 215 Serbian, Croatian, Slovak, Slovene, and Swedish.
202 and Swedish.")) 216 " . describe-european-environment-map))
203 '("European")) 217 ))
204 218
205 (set-language-info-alist 219 (set-language-info-alist
206 "Polish" '((charset ascii latin-iso8859-2) 220 "Polish" '((setup-function . (setup-latin2-environment
207 (coding-system iso-8859-2) 221 . setup-european-environment-map))
208 (coding-priority iso-8859-2) 222 (charset . (ascii latin-iso8859-2))
209 (tutorial . "TUTORIAL.pl") 223 (tutorial . "TUTORIAL.pl")
210 (documentation . "\ 224 (coding-system . (iso-8859-2))
211 This language environment is a generic one for Latin-2 (ISO-8859-2) 225 (documentation . ("\
212 character set which supports the following languages: 226 These languages are supported with the Latin-2 (ISO-8859-2) character set:
213 Albanian, Czech, English, German, Hungarian, Polish, Romanian, 227 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
214 Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower), 228 Serbian, Croatian, Slovak, Slovene, and Swedish.
215 and Swedish.")) 229 " . describe-european-environment-map))
216 '("European")) 230 ))
217 231
218 ;; Romanian support originally from romanian.el 232 ;; Romanian support originally from romanian.el
219 233
220 (defun setup-romanian-environment () 234 (defun setup-romanian-environment ()
221 "Setup multilingual environment (MULE) for Romanian." 235 "Setup multilingual environment (MULE) for Romanian."
222 (interactive) 236 (interactive)
223 (set-language-environment "Romanian")) 237 (setup-8-bit-environment "Romanian" 'latin-iso8859-2 'iso-8859-2
224 238 "romanian"))
225 (set-language-info-alist 239
226 "Romanian" '((charset ascii latin-iso8859-2) 240 (set-language-info-alist
227 (coding-system iso-8859-2) 241 "Romanian" '((setup-function . (setup-romanian-environment
228 (coding-priority iso-8859-2) 242 . setup-european-environment-map))
229 (input-method . "latin-2-postfix") 243 (charset . (ascii latin-iso8859-2))
230 (tutorial . "TUTORIAL.ro") 244 (tutorial . "TUTORIAL.ro")
231 (sample-text . "Bun,Bc(B ziua, bine a,B~(Bi venit!") 245 (coding-system . (iso-8859-2))
232 (documentation . t)) 246 (documentation . ("\
233 '("European")) 247 These languages are supported with the Latin-2 (ISO-8859-2) character set:
234 248 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
235 (provide 'romanian) 249 Serbian, Croatian, Slovak, Slovene, and Swedish.
250 " . describe-european-environment-map))
251 ))
236 252
237 ;; Czech support originally from czech.el 253 ;; Czech support originally from czech.el
238 ;; Author: Milan Zamazal <pdm@fi.muni.cz> 254 ;; Author: Milan Zamazal <pdm@fi.muni.cz>
239 ;; Maintainer(for XEmacs): David Sauer <davids@penguin.cz> 255 ;; Maintainer(for XEmacs): David Sauer <davids@penguin.cz>
240 256
241 (defun setup-czech-environment () 257 (defun setup-czech-environment ()
242 "Set up multilingual environment (MULE) for czech users." 258 "Set up multilingual environment (MULE) for czech users."
243 (interactive) 259 (interactive)
244 (set-language-environment "Czech")) 260 (setup-8-bit-environment "Czech" 'latin-iso8859-2 'iso-8859-2
245 261 "czech"))
246 (set-language-info-alist 262
247 "Czech" '((charset ascii latin-iso8859-2) 263
248 (coding-system iso-8859-2) 264 (set-language-info-alist
249 (coding-priority iso-8859-2) 265 "Czech"
250 (tutorial . "TUTORIAL.cs") 266 '((setup-function . (setup-czech-environment
251 (sample-text . "P,Bx(Bejeme v,Ba(Bm hezk,B}(B den!") 267 . setup-european-environment-map))
252 (documentation . t)) 268 (charset . (ascii latin-iso8859-2))
253 '("European")) 269 (coding-system . (iso-8859-2))
254 270 (tutorial . "TUTORIAL.cs")
255 (provide 'czech) 271 (documentation . ("\
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))
276 ))
277
256 278
257 279
258 ;; Latin-3 (ISO-8859-3) 280 ;; Latin-3 (ISO-8859-3)
259 281
260 ;; (make-coding-system 282 ;; (make-coding-system
261 ;; 'iso-latin-3 2 ?3 283 ;; 'iso-latin-3 2 ?3
262 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)" 284 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)"
263 ;; '(ascii latin-iso8859-3 nil nil 285 ;; '((ascii t) (latin-iso8859-3 t) nil nil
264 ;; nil nil nil nil nil nil nil) 286 ;; nil ascii-eol ascii-cntl nil nil nil nil))
265 ;; '((safe-charsets ascii latin-iso8859-3)
266 ;; (mime-charset . iso-8859-3)))
267 287
268 ;; (define-coding-system-alias 'iso-8859-3 'iso-latin-3) 288 ;; (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
269 ;; (define-coding-system-alias 'latin-3 'iso-latin-3) 289 ;; (define-coding-system-alias 'latin-3 'iso-latin-3)
270 290
271 (make-coding-system 291 (make-coding-system
278 )) 298 ))
279 299
280 (defun setup-latin3-environment () 300 (defun setup-latin3-environment ()
281 "Set up multilingual environment (MULE) for European Latin-3 users." 301 "Set up multilingual environment (MULE) for European Latin-3 users."
282 (interactive) 302 (interactive)
283 (set-language-environment "Latin-3")) 303 (setup-8-bit-environment "Latin-3" 'latin-iso8859-3 'iso-8859-3
284 304 "latin-3-prefix"))
285 (set-language-info-alist 305
286 "Latin-3" '((charset ascii latin-iso8859-3) 306 (set-language-info-alist
287 (coding-system iso-8859-3) 307 "Latin-3" '((setup-function . (setup-latin3-environment
288 (coding-priority iso-8859-3) 308 . setup-european-environment-map))
289 (input-method . "latin-3-prefix") 309 (charset . (ascii latin-iso8859-3))
290 (documentation . "\ 310 (coding-system . (iso-8859-3))
311 (documentation . ("\
291 These languages are supported with the Latin-3 (ISO-8859-3) character set: 312 These languages are supported with the Latin-3 (ISO-8859-3) character set:
292 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician, 313 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
293 German, Italian, Maltese, Spanish, and Turkish.")) 314 German, Italian, Maltese, Spanish, and Turkish.
294 '("European")) 315 " . describe-european-environment-map))
295 316 ))
296 317
297 ;; Latin-4 (ISO-8859-4) 318 ;; Latin-4 (ISO-8859-4)
298 319
299 ;; (make-coding-system 320 ;; (make-coding-system
300 ;; 'iso-latin-4 2 ?4 321 ;; 'iso-latin-4 2 ?4
301 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)" 322 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)"
302 ;; '(ascii latin-iso8859-4 nil nil 323 ;; '((ascii t) (latin-iso8859-4 t) nil nil
303 ;; nil nil nil nil nil nil nil) 324 ;; nil ascii-eol ascii-cntl nil nil nil nil))
304 ;; '((safe-charsets ascii latin-iso8859-4)
305 ;; (mime-charset . iso-8895-4)))
306 325
307 ;; (define-coding-system-alias 'iso-8859-4 'iso-latin-4) 326 ;; (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
308 ;; (define-coding-system-alias 'latin-4 'iso-latin-4) 327 ;; (define-coding-system-alias 'latin-4 'iso-latin-4)
309 328
310 (make-coding-system 329 (make-coding-system
317 )) 336 ))
318 337
319 (defun setup-latin4-environment () 338 (defun setup-latin4-environment ()
320 "Set up multilingual environment (MULE) for European Latin-4 users." 339 "Set up multilingual environment (MULE) for European Latin-4 users."
321 (interactive) 340 (interactive)
322 (set-language-environment "Latin-4")) 341 (setup-8-bit-environment "Latin-4" 'latin-iso8859-4 'iso-8859-4
323 342 "latin-4-prefix"))
324 (set-language-info-alist 343
325 "Latin-4" '((charset ascii latin-iso8859-4) 344 (set-language-info-alist
326 (coding-system iso-8859-4) 345 "Latin-4" '((setup-function . (setup-latin4-environment
327 (coding-priority iso-8859-4) 346 . setup-european-environment-map))
328 (input-method . "latin-4-prefix") 347 (charset . (ascii latin-iso8859-4))
329 (documentation . "\ 348 (coding-system . (iso-8859-4))
349 (documentation . ("\
330 These languages are supported with the Latin-4 (ISO-8859-4) character set: 350 These languages are supported with the Latin-4 (ISO-8859-4) character set:
331 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, 351 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
332 Latvian, Lithuanian, and Norwegian.")) 352 Latvian, Lithuanian, and Norwegian.
333 '("European")) 353 " . describe-european-environment-map))
334 354 ))
335 355
336 ;; Latin-5 (ISO-8859-9) 356 ;; Latin-5 (ISO-8859-9)
337 357
338 ;; (make-coding-system 358 ;; (make-coding-system
339 ;; 'iso-latin-5 2 ?9 359 ;; 'iso-latin-5 2 ?9
340 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)" 360 ;; "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)"
341 ;; '(ascii latin-iso8859-9 nil nil 361 ;; '((ascii t) (latin-iso8859-9 t) nil nil
342 ;; nil nil nil nil nil nil nil) 362 ;; nil ascii-eol ascii-cntl nil nil nil nil))
343 ;; '((safe-charsets ascii latin-iso8859-9)
344 ;; (mime-charset . iso-8859-9)))
345 363
346 ;; (define-coding-system-alias 'iso-8859-9 'iso-latin-5) 364 ;; (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
347 ;; (define-coding-system-alias 'latin-5 'iso-latin-5) 365 ;; (define-coding-system-alias 'latin-5 'iso-latin-5)
348 366
349 (make-coding-system 367 (make-coding-system
356 )) 374 ))
357 375
358 (defun setup-latin5-environment () 376 (defun setup-latin5-environment ()
359 "Set up multilingual environment (MULE) for European Latin-5 users." 377 "Set up multilingual environment (MULE) for European Latin-5 users."
360 (interactive) 378 (interactive)
361 (set-language-environment "Latin-5")) 379 (setup-8-bit-environment "Latin-5" 'latin-iso8859-9 'iso-8859-5
362 380 "latin-5-prefix"))
363 (set-language-info-alist 381
364 "Latin-5" '((charset ascii latin-iso8859-9) 382 (set-language-info-alist
365 (coding-system iso-8859-9) 383 "Latin-5" '((setup-function . (setup-latin5-environment
366 (coding-priority iso-8859-9) 384 . setup-european-environment-map))
367 (input-method . "latin-5-prefix") 385 (charset . (ascii latin-iso8859-9))
368 (documentation . "\ 386 (coding-system . (iso-8859-5))
369 These languages are supported with the Latin-5 (ISO-8859-9) character set.")) 387 (documentation . ("\
370 '("European")) 388 These languages are supported with the Latin-5 (ISO-8859-9) character set.
371 389 " . describe-european-environment-map))
372 390 ))
373 (defun setup-german-environment () 391
374 "Set up multilingual environment (MULE) for German users." 392 ;; (defun setup-european-environment ()
375 (interactive) 393 ;; "Setup multilingual environment (MULE) for European languages users.
376 (set-language-environment "German")) 394 ;; It actually reset MULE to the default status, and
377 395 ;; set quail-latin-1 as the default input method to be selected.
378 (set-language-info-alist 396 ;; See also the documentation of setup-english-environment."
379 "German" '((tutorial . "TUTORIAL.de") 397 ;; (setup-english-environment)
380 (charset ascii latin-iso8859-1) 398 ;; (setq default-input-method '("European" . "quail-latin-1")))
381 (coding-system iso-8859-1) 399
382 (coding-priority iso-8859-1) 400 ;; (defun describe-european-support ()
383 (input-method . "german-postfix") 401 ;; "Describe how Emacs support European languages."
384 (sample-text . "\ 402 ;; (interactive)
385 German (Deutsch Nord) Guten Tag 403 ;; (describe-language-support-internal "European"))
386 German (Deutsch S,A|(Bd) Gr,A|_(B Gott") 404
387 (documentation . "\ 405 ;; (set-language-info-alist
388 This language environment is almost the same as Latin-1, 406 ;; "European" '((setup-function . setup-european-environment)
389 but default input method is set to \"german-postfix\".")) 407 ;; (describe-function . describe-european-support)
390 '("European")) 408 ;; (charset . (ascii latin-iso8859-1 latin-iso8859-2
391 409 ;; latin-iso8859-3 latin-iso8859-4 latin-iso8859-9))
392 (defun setup-slovenian-environment () 410 ;; (coding-system . (iso-8859-1 iso-8859-2 iso-8859-3
393 "Setup multilingual environment (MULE) for Slovenian." 411 ;; iso-8859-4 iso-8859-9))
394 (interactive) 412 ;; (sample-text
395 (set-language-environment "Slovenian")) 413 ;; . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
396 414 ;; (documentation . "\
397 (set-language-info-alist 415 ;; Almost all of European languages are supported by the character sets and
398 "Slovenian" '((charset . (ascii latin-iso8859-2)) 416 ;; coding systems listed below.
399 (coding-system . (iso-8859-2)) 417 ;; To input them, LEIM (Libraries for Emacs Input Methods) should have been
400 (coding-priority . (iso-8859-2)) 418 ;; installed.")
401 (input-method . "latin-2-postfix") 419 ;; ))
402 (tutorial . "TUTORIAL.sl")
403 (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!")
404 (documentation . t))
405 '("European"))
406
407 (provide 'slovenian)
408 420
409 ;;; european.el ends here 421 ;;; european.el ends here