comparison lisp/language/european.el @ 18543:c69431ef3310

(setup-8-bit-environment): New argument LANGUAGE. (setup-latin1-environment): Adjusted for the above change. (setup-latin2-environment): Likewise. (setup-latin3-environment): Likewise. (setup-latin4-environment): Likewise. (setup-latin5-environment): Likewise.
author Kenichi Handa <handa@m17n.org>
date Wed, 02 Jul 1997 12:58:23 +0000
parents 383d11185239
children fe2070df967e
comparison
equal deleted inserted replaced
18542:9503ed5384c5 18543:c69431ef3310
36 (define-prefix-command 'setup-european-environment-map) 36 (define-prefix-command 'setup-european-environment-map)
37 (define-key-after setup-language-environment-map [European] 37 (define-key-after setup-language-environment-map [European]
38 '("European" . setup-european-environment-map) 38 '("European" . setup-european-environment-map)
39 t) 39 t)
40 40
41 ;; Setup for a langauge which uses one-byte 8-bit CHARSET, one-byte 41 ;; Setup for LANGAUGE which uses one-byte 8-bit CHARSET, one-byte
42 ;; 8-bit CODING-SYSTEM, and INPUT-METHOD. 42 ;; 8-bit CODING-SYSTEM, and INPUT-METHOD.
43 (defun setup-8-bit-environment (charset coding-system input-method) 43 (defun setup-8-bit-environment (language charset coding-system input-method)
44 (setup-english-environment) 44 (setup-english-environment)
45 (setq-default buffer-file-coding-system coding-system) 45 (setq-default buffer-file-coding-system coding-system)
46 (setq coding-category-iso-8-1 coding-system 46 (setq coding-category-iso-8-1 coding-system
47 coding-category-iso-8-2 coding-system) 47 coding-category-iso-8-2 coding-system)
48 (set-terminal-coding-system-internal coding-system) 48 (set-terminal-coding-system-internal coding-system)
55 ;; Set up for insertion of characters in this character set 55 ;; Set up for insertion of characters in this character set
56 ;; when codes 0200 - 0377 are typed in. 56 ;; when codes 0200 - 0377 are typed in.
57 (setq nonascii-insert-offset nonascii-offset))) 57 (setq nonascii-insert-offset nonascii-offset)))
58 58
59 (if input-method 59 (if input-method
60 (let ((latin-name (car input-method))) 60 (setq default-input-method input-method))
61 (setq default-input-method input-method) 61
62 ;; If this is a Latin-N character set, set up syntax for it 62 ;; If this is a Latin-N character set, set up syntax for it in
63 ;; in single-byte mode. 63 ;; single-byte mode.
64 (when (and latin-name 64 (if (string-match "^Latin-\\([1-9]\\)$" language)
65 (string-match "^Latin-\\([1-9]\\)$" latin-name)) 65 (load (downcase language))))
66 (load (downcase latin-name))))))
67 66
68 ;; Latin-1 (ISO-8859-1) 67 ;; Latin-1 (ISO-8859-1)
69 68
70 (make-coding-system 69 (make-coding-system
71 'iso-latin-1 2 ?1 70 'iso-latin-1 2 ?1
77 (define-coding-system-alias 'ctext 'iso-latin-1) 76 (define-coding-system-alias 'ctext 'iso-latin-1)
78 77
79 (defun setup-latin1-environment () 78 (defun setup-latin1-environment ()
80 "Set up multilingual environment (MULE) for European Latin-1 users." 79 "Set up multilingual environment (MULE) for European Latin-1 users."
81 (interactive) 80 (interactive)
82 (setup-8-bit-environment 'latin-iso8859-1 'iso-latin-1 81 (setup-8-bit-environment "Latin-1" 'latin-iso8859-1 'iso-latin-1
83 '("Latin-1" . "quail-latin-1"))) 82 "latin-1-prefix"))
84 83
85 (set-language-info-alist 84 (set-language-info-alist
86 "Latin-1" '((setup-function . (setup-latin1-environment 85 "Latin-1" '((setup-function . (setup-latin1-environment
87 . setup-european-environment-map)) 86 . setup-european-environment-map))
88 (charset . (ascii latin-iso8859-1)) 87 (charset . (ascii latin-iso8859-1))
107 (define-coding-system-alias 'iso-8859-2 'iso-latin-2) 106 (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
108 107
109 (defun setup-latin2-environment () 108 (defun setup-latin2-environment ()
110 "Set up multilingual environment (MULE) for European Latin-2 users." 109 "Set up multilingual environment (MULE) for European Latin-2 users."
111 (interactive) 110 (interactive)
112 (setup-8-bit-environment 'latin-iso8859-2 'iso-latin-2 111 (setup-8-bit-environment "Latin-2" 'latin-iso8859-2 'iso-latin-2
113 '("Latin-2" . "quail-latin-2"))) 112 "latin-2-prefix"))
114 113
115 (set-language-info-alist 114 (set-language-info-alist
116 "Latin-2" '((setup-function . (setup-latin2-environment 115 "Latin-2" '((setup-function . (setup-latin2-environment
117 . setup-european-environment-map)) 116 . setup-european-environment-map))
118 (charset . (ascii latin-iso8859-2)) 117 (charset . (ascii latin-iso8859-2))
135 (define-coding-system-alias 'iso-8859-3 'iso-latin-3) 134 (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
136 135
137 (defun setup-latin3-environment () 136 (defun setup-latin3-environment ()
138 "Set up multilingual environment (MULE) for European Latin-3 users." 137 "Set up multilingual environment (MULE) for European Latin-3 users."
139 (interactive) 138 (interactive)
140 (setup-8-bit-environment 'latin-iso8859-3 'iso-latin-3 139 (setup-8-bit-environment "Latin-3" 'latin-iso8859-3 'iso-latin-3
141 '("Latin-3" . "quail-latin-3"))) 140 "latin-3-prefix"))
142 141
143 (set-language-info-alist 142 (set-language-info-alist
144 "Latin-3" '((setup-function . (setup-latin3-environment 143 "Latin-3" '((setup-function . (setup-latin3-environment
145 . setup-european-environment-map)) 144 . setup-european-environment-map))
146 (charset . (ascii latin-iso8859-3)) 145 (charset . (ascii latin-iso8859-3))
163 (define-coding-system-alias 'iso-8859-4 'iso-latin-4) 162 (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
164 163
165 (defun setup-latin4-environment () 164 (defun setup-latin4-environment ()
166 "Set up multilingual environment (MULE) for European Latin-4 users." 165 "Set up multilingual environment (MULE) for European Latin-4 users."
167 (interactive) 166 (interactive)
168 (setup-8-bit-environment 'latin-iso8859-4 'iso-latin-4 167 (setup-8-bit-environment "Latin-4" 'latin-iso8859-4 'iso-latin-4
169 '("Latin-4" . "quail-latin-4"))) 168 "latin-4-prefix"))
170 169
171 (set-language-info-alist 170 (set-language-info-alist
172 "Latin-4" '((setup-function . (setup-latin4-environment 171 "Latin-4" '((setup-function . (setup-latin4-environment
173 . setup-european-environment-map)) 172 . setup-european-environment-map))
174 (charset . (ascii latin-iso8859-4)) 173 (charset . (ascii latin-iso8859-4))
191 (define-coding-system-alias 'iso-8859-9 'iso-latin-5) 190 (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
192 191
193 (defun setup-latin5-environment () 192 (defun setup-latin5-environment ()
194 "Set up multilingual environment (MULE) for European Latin-5 users." 193 "Set up multilingual environment (MULE) for European Latin-5 users."
195 (interactive) 194 (interactive)
196 (setup-8-bit-environment 'latin-iso8859-9 'iso-latin-5 195 (setup-8-bit-environment "Latin-5" 'latin-iso8859-9 'iso-latin-5
197 '("Latin-5" . "quail-latin-5"))) 196 "latin-5-prefix"))
198 197
199 (set-language-info-alist 198 (set-language-info-alist
200 "Latin-5" '((setup-function . (setup-latin5-environment 199 "Latin-5" '((setup-function . (setup-latin5-environment
201 . setup-european-environment-map)) 200 . setup-european-environment-map))
202 (charset . (ascii latin-iso8859-9)) 201 (charset . (ascii latin-iso8859-9))