From 5d3cb55957855a4c749218048326399ce8c8a7fb Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 11 Sep 1997 11:52:38 +0000 Subject: [PATCH] (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. --- lisp/international/kkc.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el index a45de7f7232..a9da69c7834 100644 --- a/lisp/international/kkc.el +++ b/lisp/international/kkc.el @@ -102,7 +102,13 @@ This string is shown at mode line when users are in KKC mode.") (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 @@ Optional arg KKC-MODE-EXIT-FUNCTION if non-nil is called on exiting KKC mode." "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 () -- 2.39.5