summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1998-08-15 01:28:14 +0000
committerKenichi Handa <handa@m17n.org>1998-08-15 01:28:14 +0000
commit15f7f59e3e07cce65515070f31f8d365c3aa72d5 (patch)
tree17b2b34f9903155edcdeecfffe5cb2bd955ec61a
parent7624ebb968275053e72a1c610a94ca54cf889d00 (diff)
downloademacs-15f7f59e3e07cce65515070f31f8d365c3aa72d5.tar.gz
(kkc-help): New function.
(kkc-keymap): Use sparse keymap. Add key binding for kkc-help.
-rw-r--r--lisp/international/kkc.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el
index 3cc7607b0ec..8b872630d5d 100644
--- a/lisp/international/kkc.el
+++ b/lisp/international/kkc.el
@@ -71,8 +71,14 @@ This string is shown at mode line when users are in KKC mode.")
(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 @@ 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)
+ (define-key map "\C-h" 'kkc-help)
map)
"Keymap for KKC (Kana Kanji Converter).")
@@ -235,6 +242,7 @@ and the return value is the length of the conversion."
(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)