changeset 36954:798d1ac75e95

(encoded-kbd-self-insert-ccl): Call ccl-execute-on-string directly so that CCL program handling multibyte sequence can work correctly. (encoded-kbd-setup-keymap): Fix the default value of `valid-codes' property of the coding system.
author Kenichi Handa <handa@m17n.org>
date Fri, 23 Mar 2001 10:45:20 +0000
parents be0d67e983a1
children ebb6774c41db
files lisp/international/encoded-kb.el
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/encoded-kb.el	Fri Mar 23 10:44:54 2001 +0000
+++ b/lisp/international/encoded-kb.el	Fri Mar 23 10:45:20 2001 +0000
@@ -237,10 +237,14 @@
 (defun encoded-kbd-self-insert-ccl ()
   (interactive)
   (let ((str (char-to-string last-command-char))
-	(coding (keyboard-coding-system)))
-    (setq str (decode-coding-string str coding))
+	(ccl (car (aref (coding-system-spec (keyboard-coding-system)) 4)))
+	(vec (make-vector 9 nil))
+	result)
+    (while (= (length (setq result (ccl-execute-on-string ccl vec str t))) 0)
+      (setq str (format "%s%c" str (read-char-exclusive))
+	    vec (make-vector 9 nil)))
     (setq unread-command-events
-	  (append (string-to-list str) unread-command-events))))
+	  (append (string-to-list result) unread-command-events))))
 
 (defun encoded-kbd-setup-keymap (coding)
   ;; At first, reset the keymap.
@@ -277,7 +281,7 @@
 
    ((eq encoded-kbd-coding 'ccl)
     (let ((valid-codes (or (coding-system-get coding 'valid-codes)
-			   '((128 255))))
+			   '((128 . 255))))
 	  elt from to)
       (while valid-codes
 	(setq elt (car valid-codes) valid-codes (cdr valid-codes))