Mercurial > emacs
comparison lisp/language/european.el @ 20743:ffa67db916b4
Remove setting up of
describe-european-environment-map and
setup-european-environment-map. Exclude them in args of calls to
set-language-info-alist. Adjusted for the change of
make-coding-system. Register coding-priority key in
language-info-alist. Add "German" language env.
(setup-8-bit-environment): Delete CODING-SYSTEM arg.
(iso-latin-1): Make it compatible with MIME-charset "iso-8859-1"
(compound-text): New coding system. `ctext' is now alias of it.
(setup-german-environment): New function.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 22 Jan 1998 01:48:25 +0000 |
parents | 5031189adff2 |
children | 00ecdcdf9120 |
comparison
equal
deleted
inserted
replaced
20742:d156e6f2513d | 20743:ffa67db916b4 |
---|---|
26 | 26 |
27 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported. | 27 ;; For Europeans, five character sets ISO8859-1,2,3,4,9 are supported. |
28 | 28 |
29 ;;; Code: | 29 ;;; Code: |
30 | 30 |
31 (define-prefix-command 'describe-european-environment-map) | |
32 (define-key-after describe-language-environment-map [European] | |
33 '("European" . describe-european-environment-map) | |
34 t) | |
35 | |
36 (define-prefix-command 'setup-european-environment-map) | |
37 (define-key-after setup-language-environment-map [European] | |
38 '("European" . setup-european-environment-map) | |
39 t) | |
40 | |
41 ;; Setup for LANGAUGE which uses one-byte 8-bit CHARSET, one-byte | 31 ;; Setup for LANGAUGE which uses one-byte 8-bit CHARSET, one-byte |
42 ;; 8-bit CODING-SYSTEM, and INPUT-METHOD. | 32 ;; 8-bit coding system, and INPUT-METHOD. |
43 (defun setup-8-bit-environment (language charset coding-system input-method) | 33 (defun setup-8-bit-environment (language charset input-method) |
44 (setup-english-environment) | 34 (setup-english-environment) |
45 (set-default-coding-systems coding-system) | 35 (set-language-environment-coding-systems language) |
46 (setq coding-category-iso-8-1 coding-system | |
47 coding-category-iso-8-2 coding-system) | |
48 | 36 |
49 (if charset | 37 (if charset |
50 (let ((nonascii-offset (- (make-char charset) 128))) | 38 (let ((nonascii-offset (- (make-char charset) 128))) |
51 ;; Set up for insertion of characters in this character set | 39 ;; Set up for insertion of characters in this character set |
52 ;; when codes 0200 - 0377 are typed in. | 40 ;; when codes 0200 - 0377 are typed in. |
63 | 51 |
64 ;; Latin-1 (ISO-8859-1) | 52 ;; Latin-1 (ISO-8859-1) |
65 | 53 |
66 (make-coding-system | 54 (make-coding-system |
67 'iso-latin-1 2 ?1 | 55 'iso-latin-1 2 ?1 |
68 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-1, Compound Text Encoding)" | 56 "ISO 2022 based 8-bit encoding for Laint-1 (MIME:ISO-8859-1)" |
57 '(ascii latin-iso8859-1 nil nil | |
58 nil nil nil nil nil nil nil nil nil nil nil nil t) | |
59 '((safe-charsets ascii latin-iso8859-1) | |
60 (mime-charset . iso-8859-1))) | |
61 | |
62 (define-coding-system-alias 'iso-8859-1 'iso-latin-1) | |
63 (define-coding-system-alias 'latin-1 'iso-latin-1) | |
64 | |
65 (make-coding-system | |
66 'compound-text 2 ?1 | |
67 "ISO 2022 based encoding used in inter client communication of X" | |
69 '((ascii t) (latin-iso8859-1 t) nil nil | 68 '((ascii t) (latin-iso8859-1 t) nil nil |
70 nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil nil t) | 69 nil ascii-eol ascii-cntl nil nil nil nil nil nil nil nil nil t) |
71 '(ascii latin-iso8859-1)) | 70 '((safe-charsets . t))) |
72 | 71 |
73 (define-coding-system-alias 'iso-8859-1 'iso-latin-1) | 72 (define-coding-system-alias 'ctext 'compound-text) |
74 (define-coding-system-alias 'latin-1 'iso-latin-1) | |
75 (define-coding-system-alias 'ctext 'iso-latin-1) | |
76 | 73 |
77 (defun setup-latin1-environment () | 74 (defun setup-latin1-environment () |
78 "Set up multilingual environment (MULE) for European Latin-1 users." | 75 "Set up multilingual environment (MULE) for European Latin-1 users." |
79 (interactive) | 76 (interactive) |
80 (setup-8-bit-environment "Latin-1" 'latin-iso8859-1 'iso-latin-1 | 77 (setup-8-bit-environment "Latin-1" 'latin-iso8859-1 "latin-1-prefix")) |
81 "latin-1-prefix")) | 78 |
82 | 79 (set-language-info-alist |
83 (set-language-info-alist | 80 "Latin-1" '((setup-function . setup-latin1-environment) |
84 "Latin-1" '((setup-function . (setup-latin1-environment | 81 (charset ascii latin-iso8859-1) |
85 . setup-european-environment-map)) | 82 (coding-system iso-latin-1) |
86 (charset . (ascii latin-iso8859-1)) | 83 (coding-priority iso-latin-1) |
87 (coding-system . (iso-latin-1)) | |
88 (sample-text | 84 (sample-text |
89 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") | 85 . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") |
90 (documentation . ("\ | 86 (documentation . "\ |
91 These languages are supported with the Latin-1 (ISO-8859-1) character set: | 87 These languages are supported with the Latin-1 (ISO-8859-1) character set: |
92 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, | 88 Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, |
93 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. | 89 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.")) |
94 " . describe-european-environment-map)) | 90 '("European")) |
95 )) | 91 |
96 | 92 |
97 ;; Latin-2 (ISO-8859-2) | 93 ;; Latin-2 (ISO-8859-2) |
98 | 94 |
99 (make-coding-system | 95 (make-coding-system |
100 'iso-latin-2 2 ?2 | 96 'iso-latin-2 2 ?2 |
101 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)" | 97 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-2)" |
102 '((ascii t) (latin-iso8859-2 t) nil nil | 98 '(ascii latin-iso8859-2 nil nil |
103 nil ascii-eol ascii-cntl nil nil nil nil) | 99 nil nil nil nil nil nil nil) |
104 '(ascii latin-iso8859-2)) | 100 '((safe-charsets ascii latin-iso8859-2) |
101 (mime-charset . iso-8859-2))) | |
105 | 102 |
106 (define-coding-system-alias 'iso-8859-2 'iso-latin-2) | 103 (define-coding-system-alias 'iso-8859-2 'iso-latin-2) |
107 (define-coding-system-alias 'latin-2 'iso-latin-2) | 104 (define-coding-system-alias 'latin-2 'iso-latin-2) |
108 | 105 |
109 (defun setup-latin2-environment () | 106 (defun setup-latin2-environment () |
110 "Set up multilingual environment (MULE) for European Latin-2 users." | 107 "Set up multilingual environment (MULE) for European Latin-2 users." |
111 (interactive) | 108 (interactive) |
112 (setup-8-bit-environment "Latin-2" 'latin-iso8859-2 'iso-latin-2 | 109 (setup-8-bit-environment "Latin-2" 'latin-iso8859-2 "latin-2-prefix")) |
113 "latin-2-prefix")) | 110 |
114 | 111 (set-language-info-alist |
115 (set-language-info-alist | 112 "Latin-2" '((setup-function . setup-latin2-environment) |
116 "Latin-2" '((setup-function . (setup-latin2-environment | 113 (charset ascii latin-iso8859-2) |
117 . setup-european-environment-map)) | 114 (coding-system iso-latin-2) |
118 (charset . (ascii latin-iso8859-2)) | 115 (coding-priority iso-latin-2) |
119 (coding-system . (iso-latin-2)) | 116 (documentation . "\ |
120 (documentation . ("\ | |
121 These languages are supported with the Latin-2 (ISO-8859-2) character set: | 117 These languages are supported with the Latin-2 (ISO-8859-2) character set: |
122 Albanian, Czech, English, German, Hungarian, Polish, Romanian, | 118 Albanian, Czech, English, German, Hungarian, Polish, Romanian, |
123 Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower), | 119 Serbo-Croatian or Croatian, Slovak, Slovene, Sorbian (upper and lower), |
124 and Swedish, | 120 and Swedish.")) |
125 " . describe-european-environment-map)) | 121 '("European")) |
126 )) | 122 |
127 | 123 |
128 ;; Latin-3 (ISO-8859-3) | 124 ;; Latin-3 (ISO-8859-3) |
129 | 125 |
130 (make-coding-system | 126 (make-coding-system |
131 'iso-latin-3 2 ?3 | 127 'iso-latin-3 2 ?3 |
132 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)" | 128 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-3)" |
133 '((ascii t) (latin-iso8859-3 t) nil nil | 129 '(ascii latin-iso8859-3 nil nil |
134 nil ascii-eol ascii-cntl nil nil nil nil) | 130 nil nil nil nil nil nil nil) |
135 '(ascii latin-iso8859-3)) | 131 '((safe-charsets ascii latin-iso8859-3) |
132 (mime-charset . iso-8859-3))) | |
136 | 133 |
137 (define-coding-system-alias 'iso-8859-3 'iso-latin-3) | 134 (define-coding-system-alias 'iso-8859-3 'iso-latin-3) |
138 (define-coding-system-alias 'latin-3 'iso-latin-3) | 135 (define-coding-system-alias 'latin-3 'iso-latin-3) |
139 | 136 |
140 (defun setup-latin3-environment () | 137 (defun setup-latin3-environment () |
141 "Set up multilingual environment (MULE) for European Latin-3 users." | 138 "Set up multilingual environment (MULE) for European Latin-3 users." |
142 (interactive) | 139 (interactive) |
143 (setup-8-bit-environment "Latin-3" 'latin-iso8859-3 'iso-latin-3 | 140 (setup-8-bit-environment "Latin-3" 'latin-iso8859-3 "latin-3-prefix")) |
144 "latin-3-prefix")) | 141 |
145 | 142 (set-language-info-alist |
146 (set-language-info-alist | 143 "Latin-3" '((setup-function . setup-latin3-environment) |
147 "Latin-3" '((setup-function . (setup-latin3-environment | 144 (charset ascii latin-iso8859-3) |
148 . setup-european-environment-map)) | 145 (coding-system iso-latin-3) |
149 (charset . (ascii latin-iso8859-3)) | 146 (coding-priority iso-latin-3) |
150 (coding-system . (iso-latin-3)) | 147 (documentation . "\ |
151 (documentation . ("\ | |
152 These languages are supported with the Latin-3 (ISO-8859-3) character set: | 148 These languages are supported with the Latin-3 (ISO-8859-3) character set: |
153 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician, | 149 Afrikaans, Catalan, Dutch, English, Esperanto, French, Galician, |
154 German, Italian, Maltese, Spanish, and Turkish. | 150 German, Italian, Maltese, Spanish, and Turkish.")) |
155 " . describe-european-environment-map)) | 151 '("European")) |
156 )) | 152 |
157 | 153 |
158 ;; Latin-4 (ISO-8859-4) | 154 ;; Latin-4 (ISO-8859-4) |
159 | 155 |
160 (make-coding-system | 156 (make-coding-system |
161 'iso-latin-4 2 ?4 | 157 'iso-latin-4 2 ?4 |
162 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)" | 158 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-4)" |
163 '((ascii t) (latin-iso8859-4 t) nil nil | 159 '(ascii latin-iso8859-4 nil nil |
164 nil ascii-eol ascii-cntl nil nil nil nil) | 160 nil nil nil nil nil nil nil) |
165 '(ascii latin-iso8859-4)) | 161 '((safe-charsets ascii latin-iso8859-4) |
162 (mime-charset . iso-8895-4))) | |
166 | 163 |
167 (define-coding-system-alias 'iso-8859-4 'iso-latin-4) | 164 (define-coding-system-alias 'iso-8859-4 'iso-latin-4) |
168 (define-coding-system-alias 'latin-4 'iso-latin-4) | 165 (define-coding-system-alias 'latin-4 'iso-latin-4) |
169 | 166 |
170 (defun setup-latin4-environment () | 167 (defun setup-latin4-environment () |
171 "Set up multilingual environment (MULE) for European Latin-4 users." | 168 "Set up multilingual environment (MULE) for European Latin-4 users." |
172 (interactive) | 169 (interactive) |
173 (setup-8-bit-environment "Latin-4" 'latin-iso8859-4 'iso-latin-4 | 170 (setup-8-bit-environment "Latin-4" 'latin-iso8859-4 "latin-4-prefix")) |
174 "latin-4-prefix")) | 171 |
175 | 172 (set-language-info-alist |
176 (set-language-info-alist | 173 "Latin-4" '((setup-function . setup-latin4-environment) |
177 "Latin-4" '((setup-function . (setup-latin4-environment | 174 (charset ascii latin-iso8859-4) |
178 . setup-european-environment-map)) | 175 (coding-system iso-8859-4) |
179 (charset . (ascii latin-iso8859-4)) | 176 (coding-priority iso-8859-4) |
180 (coding-system . (iso-8859-4)) | 177 (documentation . "\ |
181 (documentation . ("\ | |
182 These languages are supported with the Latin-4 (ISO-8859-4) character set: | 178 These languages are supported with the Latin-4 (ISO-8859-4) character set: |
183 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, | 179 Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, |
184 Latvian, Lithuanian, and Norwegian. | 180 Latvian, Lithuanian, and Norwegian.")) |
185 " . describe-european-environment-map)) | 181 '("European")) |
186 )) | 182 |
187 | 183 |
188 ;; Latin-5 (ISO-8859-9) | 184 ;; Latin-5 (ISO-8859-9) |
189 | 185 |
190 (make-coding-system | 186 (make-coding-system |
191 'iso-latin-5 2 ?9 | 187 'iso-latin-5 2 ?9 |
192 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)" | 188 "ISO 2022 based 8-bit encoding (MIME:ISO-8859-9)" |
193 '((ascii t) (latin-iso8859-9 t) nil nil | 189 '(ascii latin-iso8859-9 nil nil |
194 nil ascii-eol ascii-cntl nil nil nil nil) | 190 nil nil nil nil nil nil nil) |
195 '(ascii latin-iso8859-9)) | 191 '((safe-charsets ascii latin-iso8859-9) |
192 (mime-charset . iso-8859-9))) | |
196 | 193 |
197 (define-coding-system-alias 'iso-8859-9 'iso-latin-5) | 194 (define-coding-system-alias 'iso-8859-9 'iso-latin-5) |
198 (define-coding-system-alias 'latin-5 'iso-latin-5) | 195 (define-coding-system-alias 'latin-5 'iso-latin-5) |
199 | 196 |
200 (defun setup-latin5-environment () | 197 (defun setup-latin5-environment () |
201 "Set up multilingual environment (MULE) for European Latin-5 users." | 198 "Set up multilingual environment (MULE) for European Latin-5 users." |
202 (interactive) | 199 (interactive) |
203 (setup-8-bit-environment "Latin-5" 'latin-iso8859-9 'iso-latin-5 | 200 (setup-8-bit-environment "Latin-5" 'latin-iso8859-9 "latin-5-prefix")) |
204 "latin-5-prefix")) | 201 |
205 | 202 (set-language-info-alist |
206 (set-language-info-alist | 203 "Latin-5" '((setup-function . setup-latin5-environment) |
207 "Latin-5" '((setup-function . (setup-latin5-environment | 204 (charset ascii latin-iso8859-9) |
208 . setup-european-environment-map)) | 205 (coding-system iso-latin-5) |
209 (charset . (ascii latin-iso8859-9)) | 206 (coding-priority iso-latin-5) |
210 (coding-system . (iso-latin-5)) | 207 (documentation . "\ |
211 (documentation . ("\ | 208 These languages are supported with the Latin-5 (ISO-8859-9) character set.")) |
212 These languages are supported with the Latin-5 (ISO-8859-9) character set. | 209 '("European")) |
213 " . describe-european-environment-map)) | 210 |
214 )) | 211 |
212 (defun setup-german-environment () | |
213 "Set up multilingual environment (MULE) for German users." | |
214 (interactive) | |
215 (funcall (get-language-info "Latin-1" 'setup-function)) | |
216 (setq default-input-method "german-postfix")) | |
217 | |
218 (set-language-info-alist | |
219 "German" '((setup-function . setup-german-environment) | |
220 (tutorial . "TUTORIAL.de") | |
221 (charset ascii latin-iso8859-1) | |
222 (coding-system iso-latin-1) | |
223 (coding-priority iso-latin-1) | |
224 (sample-text . "\ | |
225 German (Deutsch Nord) Guten Tag | |
226 German (Deutsch S,A|(Bd) Gr,A|_(B Gott") | |
227 (documentation . "\ | |
228 This language environment is almost the same as Latin-1, | |
229 but default input method is set to \"german-postfix\".")) | |
230 '("European")) | |
215 | 231 |
216 ;;; european.el ends here | 232 ;;; european.el ends here |