# HG changeset patch # User Kenichi Handa # Date 903144494 0 # Node ID d5a1574f7fb818ac861878f8180f70c83d0950a6 # Parent 5e2bc240edfc82fc78e5c690f90e1abf42b76997 (kkc-help): New function. (kkc-keymap): Use sparse keymap. Add key binding for kkc-help. diff -r 5e2bc240edfc -r d5a1574f7fb8 lisp/international/kkc.el --- a/lisp/international/kkc.el Sat Aug 15 01:28:14 1998 +0000 +++ b/lisp/international/kkc.el Sat Aug 15 01:28:14 1998 +0000 @@ -71,8 +71,14 @@ (defvar kkc-show-conversion-list-index-chars "1234567890") +(defun kkc-help () + "Show key bindings available while converting by KKC." + (interactive) + (with-output-to-temp-buffer "*Help*" + (princ (substitute-command-keys "\\{kkc-keymap}")))) + (defvar kkc-keymap - (let ((map (make-keymap)) + (let ((map (make-sparse-keymap)) (len (length kkc-show-conversion-list-index-chars)) (i 0)) (while (< i len) @@ -99,6 +105,7 @@ (define-key map [?\C- ] 'kkc-first-char-only) (define-key map [delete] 'kkc-cancel) (define-key map [return] 'kkc-terminate) + (define-key map "\C-h" 'kkc-help) map) "Keymap for KKC (Kana Kanji Converter).") @@ -235,6 +242,7 @@ (setq kkc-converting t) (while kkc-converting (let* ((overriding-terminal-local-map kkc-keymap) + (help-char nil) (keyseq (read-key-sequence nil)) (cmd (lookup-key kkc-keymap keyseq))) (if (commandp cmd)