Mercurial > emacs
comparison lisp/international/kkc.el @ 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 | 0933bf4b82c9 |
children | a17cd573df1c |
comparison
equal
deleted
inserted
replaced
19868:8bd07c31e8bf | 19869:3c4025f3be8f |
---|---|
100 (define-key map "l" 'kkc-show-conversion-list-or-next-group) | 100 (define-key map "l" 'kkc-show-conversion-list-or-next-group) |
101 (define-key map "L" 'kkc-show-conversion-list-or-prev-group) | 101 (define-key map "L" 'kkc-show-conversion-list-or-prev-group) |
102 (define-key map [?\C-\ ] 'kkc-first-char-only) | 102 (define-key map [?\C-\ ] 'kkc-first-char-only) |
103 (define-key map [delete] 'kkc-cancel) | 103 (define-key map [delete] 'kkc-cancel) |
104 (define-key map [return] 'kkc-terminate) | 104 (define-key map [return] 'kkc-terminate) |
105 (append map '((t . kkc-non-kkc-command)))) | 105 (let ((meta-map (make-sparse-keymap))) |
106 (define-key map (char-to-string meta-prefix-char) meta-map) | |
107 (define-key map [escape] meta-map)) | |
108 (define-key map (vector meta-prefix-char t) 'kkc-non-kkc-command) | |
109 ;; At last, define default key binding. | |
110 (define-key map [t] 'kkc-non-kkc-command) | |
111 map) | |
106 "Keymap for KKC (Kana Kanji Conversion) mode.") | 112 "Keymap for KKC (Kana Kanji Conversion) mode.") |
107 | 113 |
108 (defun kkc-mode () | 114 (defun kkc-mode () |
109 "Major mode for converting Kana string to Kanji-Kana mixed string. | 115 "Major mode for converting Kana string to Kanji-Kana mixed string. |
110 Commands: | 116 Commands: |
260 | 266 |
261 (defun kkc-non-kkc-command () | 267 (defun kkc-non-kkc-command () |
262 "Exit from KKC mode by fixing the current conversion. | 268 "Exit from KKC mode by fixing the current conversion. |
263 After that, handle the event which invoked this command." | 269 After that, handle the event which invoked this command." |
264 (interactive) | 270 (interactive) |
265 (setq unread-command-events (list last-input-event)) | 271 (let* ((key (this-command-keys)) |
272 (keylist (listify-key-sequence key))) | |
273 (setq unread-command-events (append keylist unread-command-events))) | |
266 (kkc-terminate)) | 274 (kkc-terminate)) |
267 | 275 |
268 (defun kkc-cancel () | 276 (defun kkc-cancel () |
269 "Exit from KKC mode by canceling any conversions." | 277 "Exit from KKC mode by canceling any conversions." |
270 (interactive) | 278 (interactive) |