Commit 5d3cb559 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(kkc-mode-map): Bind meta-prefix-char to a

map which only has default key binding to
(kkc-non-kkc-command): Handle the key sequence as the same way as
parent e87601de
......@@ -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)
"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."
(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)))
(defun kkc-cancel ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment