Mercurial > emacs
comparison lisp/international/encoded-kb.el @ 19421:5c790f1ce4b4
(encoded-kbd-iso2022-designations):
(encoded-kbd-iso2022-invocations): Don't make these vars buffer-local.
(encoded-kbd-mode): Don't make encoded-kbd-iso2022-designations
or encoded-kbd-iso2022-invocations buffer-local.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 19 Aug 1997 01:22:06 +0000 |
parents | ecb55608fa91 |
children | 31d9ded94ba4 |
comparison
equal
deleted
inserted
replaced
19420:681823a203b6 | 19421:5c790f1ce4b4 |
---|---|
101 ;; Keep information of designation state of ISO2022 encoding. This is | 101 ;; Keep information of designation state of ISO2022 encoding. This is |
102 ;; a vector of character sets currently designated to each graphic | 102 ;; a vector of character sets currently designated to each graphic |
103 ;; registers (0..3). | 103 ;; registers (0..3). |
104 | 104 |
105 (defvar encoded-kbd-iso2022-designations nil) | 105 (defvar encoded-kbd-iso2022-designations nil) |
106 (make-variable-buffer-local 'encoded-kbd-iso2022-designations) | |
107 (put 'encoded-kbd-iso2022-designations 'permanent-local t) | 106 (put 'encoded-kbd-iso2022-designations 'permanent-local t) |
108 | 107 |
109 ;; Keep information of invocation state of ISO2022 encoding. This is | 108 ;; Keep information of invocation state of ISO2022 encoding. This is |
110 ;; a vector of graphic register numbers currently invoked to each | 109 ;; a vector of graphic register numbers currently invoked to each |
111 ;; graphic plane (0..1), the third element is a single shifted graphic | 110 ;; graphic plane (0..1), the third element is a single shifted graphic |
112 ;; register number. | 111 ;; register number. |
113 | 112 |
114 (defvar encoded-kbd-iso2022-invocations nil) | 113 (defvar encoded-kbd-iso2022-invocations nil) |
115 (make-variable-buffer-local 'encoded-kbd-iso2022-invocations) | |
116 (put 'encoded-kbd-iso2022-invocations 'permanent-local t) | 114 (put 'encoded-kbd-iso2022-invocations 'permanent-local t) |
117 | 115 |
118 (defun encoded-kbd-iso2022-designation () | 116 (defun encoded-kbd-iso2022-designation () |
119 "Do ISO2022 designation according to the curren key in Encoded-kbd mode. | 117 "Do ISO2022 designation according to the curren key in Encoded-kbd mode. |
120 The following key sequence may cause multilingual text insertion." | 118 The following key sequence may cause multilingual text insertion." |
260 (setq encoded-kbd-coding 'iso2022-7) | 258 (setq encoded-kbd-coding 'iso2022-7) |
261 (set-input-mode | 259 (set-input-mode |
262 (nth 0 saved-input-mode) (nth 1 saved-input-mode) | 260 (nth 0 saved-input-mode) (nth 1 saved-input-mode) |
263 'use-8th-bit (nth 3 saved-input-mode)) | 261 'use-8th-bit (nth 3 saved-input-mode)) |
264 (setq encoded-kbd-coding 'iso2022-8)) | 262 (setq encoded-kbd-coding 'iso2022-8)) |
265 (make-variable-buffer-local 'encoded-kbd-iso2022-designations) | |
266 (setq encoded-kbd-iso2022-designations (make-vector 4 nil)) | 263 (setq encoded-kbd-iso2022-designations (make-vector 4 nil)) |
267 (let ((flags (coding-system-flags coding)) | 264 (let ((flags (coding-system-flags coding)) |
268 (i 0)) | 265 (i 0)) |
269 (while (< i 4) | 266 (while (< i 4) |
270 (if (charsetp (aref flags i)) | 267 (if (charsetp (aref flags i)) |
272 (aref flags i)) | 269 (aref flags i)) |
273 (if (charsetp (car-safe (aref flags i))) | 270 (if (charsetp (car-safe (aref flags i))) |
274 (aset encoded-kbd-iso2022-designations i | 271 (aset encoded-kbd-iso2022-designations i |
275 (car (aref flags i))))) | 272 (car (aref flags i))))) |
276 (setq i (1+ i)))) | 273 (setq i (1+ i)))) |
277 (make-variable-buffer-local 'encoded-kbd-iso2022-invocations) | |
278 (setq encoded-kbd-iso2022-invocations (make-vector 3 nil)) | 274 (setq encoded-kbd-iso2022-invocations (make-vector 3 nil)) |
279 (aset encoded-kbd-iso2022-invocations 0 0) | 275 (aset encoded-kbd-iso2022-invocations 0 0) |
280 (aset encoded-kbd-iso2022-invocations 1 1)) | 276 (aset encoded-kbd-iso2022-invocations 1 1)) |
281 | 277 |
282 ((= (coding-system-type coding) 3) ; BIG5 | 278 ((= (coding-system-type coding) 3) ; BIG5 |