changeset 19869:3c4025f3be8f

(kkc-mode-map): Bind meta-prefix-char to a map which only has default key binding to quail-execute-non-quail-command. (kkc-non-kkc-command): Handle the key sequence as the same way as universal-argument-other-key.
author Kenichi Handa <handa@m17n.org>
date Thu, 11 Sep 1997 11:52:38 +0000
parents 8bd07c31e8bf
children a016beb4f4cf
files lisp/international/kkc.el
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/kkc.el	Thu Sep 11 05:33:51 1997 +0000
+++ b/lisp/international/kkc.el	Thu Sep 11 11:52:38 1997 +0000
@@ -102,7 +102,13 @@
     (define-key map [?\C-\ ] 'kkc-first-char-only)
     (define-key map [delete] 'kkc-cancel)
     (define-key map [return] 'kkc-terminate)
-    (append map '((t . kkc-non-kkc-command))))
+    (let ((meta-map (make-sparse-keymap)))
+      (define-key map (char-to-string meta-prefix-char) meta-map)
+      (define-key map [escape] meta-map))
+    (define-key map (vector meta-prefix-char t) 'kkc-non-kkc-command)
+    ;; At last, define default key binding.
+    (define-key map [t] 'kkc-non-kkc-command)
+    map)
   "Keymap for KKC (Kana Kanji Conversion) mode.")
 
 (defun kkc-mode ()
@@ -262,7 +268,9 @@
   "Exit from KKC mode by fixing the current conversion.
 After that, handle the event which invoked this command."
   (interactive)
-  (setq unread-command-events (list last-input-event))
+  (let* ((key (this-command-keys))
+	 (keylist (listify-key-sequence key)))
+    (setq unread-command-events (append keylist unread-command-events)))
   (kkc-terminate))
 
 (defun kkc-cancel ()