changeset 22781:d7ebc53b6b16

(quail-japanese-update-translation): Handle a key which should fix the current translation and start a new translation correctly. (quail-japanese-toggle-kana): Set quail-translating to nil. Don't change point.
author Kenichi Handa <handa@m17n.org>
date Sun, 19 Jul 1998 05:17:35 +0000
parents 54069d469c31
children 346c8633f094
files leim/quail/japanese.el
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/leim/quail/japanese.el	Sun Jul 19 05:17:35 1998 +0000
+++ b/leim/quail/japanese.el	Sun Jul 19 05:17:35 1998 +0000
@@ -36,7 +36,10 @@
 	((null control-flag)
 	 (if (/= (aref quail-current-key 0) ?q)
 	     (insert (or quail-current-str quail-current-key))))
-	(t				; i.e. (numberp control-flag)
+	((= control-flag 0)
+	 (insert (aref quail-current-key 0))
+	 (quail-terminate-translation))
+	(t
 	 (cond ((= (aref quail-current-key 0) ?n)
 		(insert ?ん))
 	       ((= (aref quail-current-key 0) (aref quail-current-key 1))
@@ -54,6 +57,7 @@
 ;; Convert Hiragana <-> Katakana in the current translation region.
 (defun quail-japanese-toggle-kana ()
   (interactive)
+  (setq quail-translating nil)
   (let ((start (overlay-start quail-conv-overlay))
 	(end (overlay-end quail-conv-overlay)))
     (setq quail-japanese-kana-state
@@ -61,8 +65,7 @@
 	      (not quail-japanese-kana-state)))
     (if quail-japanese-kana-state
 	(japanese-hiragana-region start end)
-      (japanese-katakana-region start end))
-    (goto-char (overlay-end quail-conv-overlay))))
+      (japanese-katakana-region start end))))
 
 ;; Convert Hiragana in the current translation region to Kanji by KKC
 ;; (Kana Kanji Converter) utility.