1 ;;; european.el --- Support for European languages
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
6 ;; Keywords: multilingual, European
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
27 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported.
31 (define-prefix-command 'describe-european-support-map)
32 (define-key-after describe-language-support-map [European]
33 '("European" . describe-european-support-map)
36 (define-prefix-command 'setup-european-environment-map)
37 (define-key-after setup-language-environment-map [European]
38 '("European" . setup-european-environment-map)
41 ;; Setup for a langauge which uses one-byte 8-bit CHARSET, one-byte
42 ;; 8-bit CODING-SYSTEM, and INPUT-METHOD.
43 (defun setup-8-bit-environment (charset coding-system input-method)
44 (setup-english-environment)
45 (setq-default buffer-file-coding-system coding-system)
46 (setq coding-category-iso-8-1 coding-system
47 coding-category-iso-8-2 coding-system)
48 (set-terminal-coding-system-internal coding-system)
49 (set-keyboard-coding-system-internal coding-system)
50 (setq sendmail-coding-system nil
51 rmail-file-coding-system coding-system)
54 (let ((nonascii-offset (make-char charset)))
55 (setq nonascii-insert-offset nonascii-offset
56 set-case-syntax-offset nonascii-offset)))
59 (setq default-input-method input-method)))
61 ;; Latin-1 (ISO-8859-1)
65 "MIME ISO-8859-1 Compound Text Encoding."
66 '((ascii t) (latin-iso8859-1 t) nil nil
67 nil ascii-eol ascii-cntl))
69 ;; CTEXT is an alias for ISO-8859-1
70 (define-coding-system-alias 'iso-8859-1 'ctext)
72 (register-input-method "Latin-1"
73 '("quail-latin-1" quail-use-package "quail/latin"))
75 (defun setup-latin1-environment ()
76 "Set up multilingual environment (MULE) for European Latin-1 users."
78 (setup-8-bit-environment 'latin-iso8859-1 'iso-8859-1
79 '("Latin-1" . "quail-latin-1")))
81 (set-language-info-alist
82 "Latin-1" '((setup-function . (setup-latin1-environment
83 . setup-european-environment-map))
84 (charset . (ascii latin-iso8859-1))
85 (coding-system . (iso-8859-1))
87 . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
89 These languages are supported with the Latin-1 (ISO-8859-1) character set:
90 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
91 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
92 " . describe-european-support-map))
95 ;; Latin-2 (ISO-8859-2)
98 'iso-8859-2 2 ?2 "MIME ISO-8859-2"
99 '((ascii t) (latin-iso8859-2 t) nil nil
100 nil ascii-eol ascii-cntl nil nil nil nil))
102 (register-input-method "Latin-2"
103 '("quail-latin-2" quail-use-package "quail/latin"))
105 (defun setup-latin2-environment ()
106 "Set up multilingual environment (MULE) for European Latin-2 users."
108 (setup-8-bit-environment 'latin-iso8859-2 'iso-8859-2
109 '("Latin-2" . "quail-latin-2")))
111 (set-language-info-alist
112 "Latin-2" '((setup-function . (setup-latin2-environment
113 . setup-european-environment-map))
114 (charset . (ascii latin-iso8859-2))
115 (coding-system . (iso-8859-2))
117 These languages are supported with the Latin-2 (ISO-8859-2) character set:
118 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
119 Serbo-Croatian, Slovak, Slovene, and Swedish.
120 " . describe-european-support-map))
123 ;; Latin-3 (ISO-8859-3)
126 'iso-8859-3 2 ?3 "MIME ISO-8859-3"
127 '((ascii t) (latin-iso8859-3 t) nil nil
128 nil ascii-eol ascii-cntl nil nil nil nil))
130 (register-input-method "Latin-3"
131 '("quail-latin-3" quail-use-package "quail/latin"))
133 (defun setup-latin3-environment ()
134 "Set up multilingual environment (MULE) for European Latin-3 users."
136 (setup-8-bit-environment 'latin-iso8859-3 'iso-8859-3
137 '("Latin-3" . "quail-latin-3")))
139 (set-language-info-alist
140 "Latin-3" '((setup-function . (setup-latin3-environment
141 . setup-european-environment-map))
142 (charset . (ascii latin-iso8859-3))
143 (coding-system . (iso-8859-3))
145 These languages are supported with the Latin-3 (ISO-8859-3) character set:
146 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
147 German, Italian, Maltese, Spanish, and Turkish.
148 " . describe-european-support-map))
151 ;; Latin-4 (ISO-8859-4)
154 'iso-8859-4 2 ?4 "MIME ISO-8859-4"
155 '((ascii t) (latin-iso8859-4 t) nil nil
156 nil ascii-eol ascii-cntl nil nil nil nil))
158 (register-input-method "Latin-4"
159 '("quail-latin-4" quail-use-package "quail/latin"))
161 (defun setup-latin4-environment ()
162 "Set up multilingual environment (MULE) for European Latin-4 users."
164 (setup-8-bit-environment 'latin-iso8859-4 'iso-8859-4
165 '("Latin-4" . "quail-latin-4")))
167 (set-language-info-alist
168 "Latin-4" '((setup-function . (setup-latin4-environment
169 . setup-european-environment-map))
170 (charset . (ascii latin-iso8859-4))
171 (coding-system . (iso-8859-4))
173 These languages are supported with the Latin-4 (ISO-8859-4) character set:
174 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
175 Latvian, Lithuanian, and Norwegian.
176 " . describe-european-support-map))
179 ;; Latin-5 (ISO-8859-9)
182 'iso-8859-9 2 ?9 "MIME ISO-8859-9"
183 '((ascii t) (latin-iso8859-9 t) nil nil
184 nil ascii-eol ascii-cntl nil nil nil nil))
186 (register-input-method "Latin-5"
187 '("quail-latin-5" quail-use-package "quail/latin"))
189 (defun setup-latin5-environment ()
190 "Set up multilingual environment (MULE) for European Latin-5 users."
192 (setup-8-bit-environment 'latin-iso8859-9 'iso-8859-9
193 '("Latin-5" . "quail-latin-5")))
195 (set-language-info-alist
196 "Latin-5" '((setup-function . (setup-latin5-environment
197 . setup-european-environment-map))
198 (charset . (ascii latin-iso8859-9))
199 (coding-system . (iso-8859-9))
201 These languages are supported with the Latin-5 (ISO-8859-9) character set.
202 " . describe-european-support-map))
205 (let ((languages '("French" "German" "Spanish" "Italian"
206 ;; We have to list much more European languages here.
208 (val '("quail-latin-1" quail-use-package "quail/latin")))
210 (register-input-method (car languages) val)
211 (setq languages (cdr languages))))
213 ;;; european.el ends here