comparison lisp/international/encoded-kb.el @ 18697:2185491b8d24

(encoded-kbd-mode): Call coding-system-XXX instead of coding-vector-XXX.
author Kenichi Handa <handa@m17n.org>
date Wed, 09 Jul 1997 06:56:04 +0000
parents 8b4a66c66dd6
children ecb55608fa91
comparison
equal deleted inserted replaced
18696:1caf720e4f55 18697:2185491b8d24
235 (interactive "P") 235 (interactive "P")
236 (setq encoded-kbd-mode 236 (setq encoded-kbd-mode
237 (if (null arg) (null encoded-kbd-mode) 237 (if (null arg) (null encoded-kbd-mode)
238 (> (prefix-numeric-value arg) 0))) 238 (> (prefix-numeric-value arg) 0)))
239 (if encoded-kbd-mode 239 (if encoded-kbd-mode
240 (let* ((coding (coding-system-vector (keyboard-coding-system))) 240 (let ((coding (keyboard-coding-system))
241 (input-mode (current-input-mode))) 241 (input-mode (current-input-mode)))
242 (cond ((null coding) 242 (cond ((null coding)
243 (setq encoded-kbd-mode nil) 243 (setq encoded-kbd-mode nil)
244 (error "No coding-system for terminal keyboard is set")) 244 (error "No coding-system for terminal keyboard is set"))
245 245
246 ((= (coding-vector-type coding) 1) ; SJIS 246 ((= (coding-system-type coding) 1) ; SJIS
247 (set-input-mode (nth 0 input-mode) (nth 1 input-mode) 247 (set-input-mode (nth 0 input-mode) (nth 1 input-mode)
248 'use-8th-bit (nth 3 input-mode)) 248 'use-8th-bit (nth 3 input-mode))
249 (setq encoded-kbd-coding 'sjis)) 249 (setq encoded-kbd-coding 'sjis))
250 250
251 ((= (coding-vector-type coding) 2) ; ISO2022 251 ((= (coding-system-type coding) 2) ; ISO2022
252 (if (aref (coding-vector-flags coding) 7) ; 7-bit only 252 (if (aref (coding-system-flags coding) 7) ; 7-bit only
253 (setq encoded-kbd-coding 'iso2022-7) 253 (setq encoded-kbd-coding 'iso2022-7)
254 (set-input-mode (nth 0 input-mode) (nth 1 input-mode) 254 (set-input-mode (nth 0 input-mode) (nth 1 input-mode)
255 'use-8th-bit (nth 3 input-mode)) 255 'use-8th-bit (nth 3 input-mode))
256 (setq encoded-kbd-coding 'iso2022-8)) 256 (setq encoded-kbd-coding 'iso2022-8))
257 (make-variable-buffer-local 'encoded-kbd-iso2022-designations) 257 (make-variable-buffer-local 'encoded-kbd-iso2022-designations)
258 (setq encoded-kbd-iso2022-designations (make-vector 4 nil)) 258 (setq encoded-kbd-iso2022-designations (make-vector 4 nil))
259 (let ((flags (coding-vector-flags coding)) 259 (let ((flags (coding-system-flags coding))
260 (i 0)) 260 (i 0))
261 (while (< i 4) 261 (while (< i 4)
262 (if (charsetp (aref flags i)) 262 (if (charsetp (aref flags i))
263 (aset encoded-kbd-iso2022-designations i 263 (aset encoded-kbd-iso2022-designations i
264 (aref flags i))) 264 (aref flags i)))
266 (make-variable-buffer-local 'encoded-kbd-iso2022-invocations) 266 (make-variable-buffer-local 'encoded-kbd-iso2022-invocations)
267 (setq encoded-kbd-iso2022-invocations (make-vector 3 nil)) 267 (setq encoded-kbd-iso2022-invocations (make-vector 3 nil))
268 (aset encoded-kbd-iso2022-invocations 0 0) 268 (aset encoded-kbd-iso2022-invocations 0 0)
269 (aset encoded-kbd-iso2022-invocations 1 1)) 269 (aset encoded-kbd-iso2022-invocations 1 1))
270 270
271 ((= (coding-vector-type coding) 3) ; BIG5 271 ((= (coding-system-type coding) 3) ; BIG5
272 (set-input-mode (nth 0 input-mode) (nth 1 input-mode) 272 (set-input-mode (nth 0 input-mode) (nth 1 input-mode)
273 'use-8th-bit (nth 3 input-mode)) 273 'use-8th-bit (nth 3 input-mode))
274 (setq encoded-kbd-coding 'big5)) 274 (setq encoded-kbd-coding 'big5))
275 275
276 (t 276 (t