1 ;;; european.el --- Support for European languages
3 ;; Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
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-environment-map)
32 (define-key-after describe-language-environment-map [European]
33 '("European" . describe-european-environment-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 coding-system
51 rmail-file-coding-system coding-system)
54 (let ((nonascii-offset (- (make-char charset) 128)))
55 ;; Set up for insertion of characters in this character set
56 ;; when codes 0200 - 0377 are typed in.
57 (setq nonascii-insert-offset nonascii-offset)))
60 (let ((latin-name (car input-method)))
61 (setq default-input-method input-method)
62 ;; If this is a Latin-N character set, set up syntax for it
63 ;; in single-byte mode.
65 (string-match "^Latin-\\([1-9]\\)$" latin-name))
66 (load (downcase latin-name))))))
68 ;; Latin-1 (ISO-8859-1)
72 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-1, Compound Text Encoding)"
73 '((ascii t) (latin-iso8859-1 t) nil nil
74 nil ascii-eol ascii-cntl))
76 (define-coding-system-alias 'iso-latin-1 'iso-8859-1)
77 (define-coding-system-alias 'iso-latin-1 'ctext)
79 (defun setup-latin1-environment ()
80 "Set up multilingual environment (MULE) for European Latin-1 users."
82 (setup-8-bit-environment 'latin-iso8859-1 'iso-latin-1
83 '("Latin-1" . "quail-latin-1")))
85 (set-language-info-alist
86 "Latin-1" '((setup-function . (setup-latin1-environment
87 . setup-european-environment-map))
88 (charset . (ascii latin-iso8859-1))
89 (coding-system . (iso-latin-1))
91 . "Hello, Hej, Tere, Hei, Bonjour, Gr
\e,A|_
\e(B Gott, Ciao,
\e,A!
\e(BHola!")
93 These languages are supported with the Latin-1 (ISO-8859-1) character set:
94 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
95 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
96 " . describe-european-environment-map))
99 ;; Latin-2 (ISO-8859-2)
103 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)"
104 '((ascii t) (latin-iso8859-2 t) nil nil
105 nil ascii-eol ascii-cntl nil nil nil nil))
107 (define-coding-system-alias 'iso-latin-2 'iso-8859-2)
109 (defun setup-latin2-environment ()
110 "Set up multilingual environment (MULE) for European Latin-2 users."
112 (setup-8-bit-environment 'latin-iso8859-2 'iso-latin-2
113 '("Latin-2" . "quail-latin-2")))
115 (set-language-info-alist
116 "Latin-2" '((setup-function . (setup-latin2-environment
117 . setup-european-environment-map))
118 (charset . (ascii latin-iso8859-2))
119 (coding-system . (iso-latin-2))
121 These languages are supported with the Latin-2 (ISO-8859-2) character set:
122 Albanian, Czech, English, German, Hungarian, Polish, Romanian,
123 Serbo-Croatian or Croatian, Slovak, Slovene, and Swedish.
124 " . describe-european-environment-map))
127 ;; Latin-3 (ISO-8859-3)
131 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)"
132 '((ascii t) (latin-iso8859-3 t) nil nil
133 nil ascii-eol ascii-cntl nil nil nil nil))
135 (define-coding-system-alias 'iso-latin-3 'iso-8859-3)
137 (defun setup-latin3-environment ()
138 "Set up multilingual environment (MULE) for European Latin-3 users."
140 (setup-8-bit-environment 'latin-iso8859-3 'iso-latin-3
141 '("Latin-3" . "quail-latin-3")))
143 (set-language-info-alist
144 "Latin-3" '((setup-function . (setup-latin3-environment
145 . setup-european-environment-map))
146 (charset . (ascii latin-iso8859-3))
147 (coding-system . (iso-latin-3))
149 These languages are supported with the Latin-3 (ISO-8859-3) character set:
150 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician,
151 German, Italian, Maltese, Spanish, and Turkish.
152 " . describe-european-environment-map))
155 ;; Latin-4 (ISO-8859-4)
159 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)"
160 '((ascii t) (latin-iso8859-4 t) nil nil
161 nil ascii-eol ascii-cntl nil nil nil nil))
163 (define-coding-system-alias 'iso-latin-4 'iso-8859-4)
165 (defun setup-latin4-environment ()
166 "Set up multilingual environment (MULE) for European Latin-4 users."
168 (setup-8-bit-environment 'latin-iso8859-4 'iso-latin-4
169 '("Latin-4" . "quail-latin-4")))
171 (set-language-info-alist
172 "Latin-4" '((setup-function . (setup-latin4-environment
173 . setup-european-environment-map))
174 (charset . (ascii latin-iso8859-4))
175 (coding-system . (iso-8859-4))
177 These languages are supported with the Latin-4 (ISO-8859-4) character set:
178 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish,
179 Latvian, Lithuanian, and Norwegian.
180 " . describe-european-environment-map))
183 ;; Latin-5 (ISO-8859-9)
187 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)"
188 '((ascii t) (latin-iso8859-9 t) nil nil
189 nil ascii-eol ascii-cntl nil nil nil nil))
191 (define-coding-system-alias 'iso-latin-5 'iso-8859-9)
193 (defun setup-latin5-environment ()
194 "Set up multilingual environment (MULE) for European Latin-5 users."
196 (setup-8-bit-environment 'latin-iso8859-9 'iso-latin-5
197 '("Latin-5" . "quail-latin-5")))
199 (set-language-info-alist
200 "Latin-5" '((setup-function . (setup-latin5-environment
201 . setup-european-environment-map))
202 (charset . (ascii latin-iso8859-9))
203 (coding-system . (iso-latin-5))
205 These languages are supported with the Latin-5 (ISO-8859-9) character set.
206 " . describe-european-environment-map))
209 ;;; european.el ends here