]> git.eshelyaron.com Git - emacs.git/commitdiff
(quail-japanese-update-translation): Handle
authorKenichi Handa <handa@m17n.org>
Sun, 19 Jul 1998 05:17:35 +0000 (05:17 +0000)
committerKenichi Handa <handa@m17n.org>
Sun, 19 Jul 1998 05:17:35 +0000 (05:17 +0000)
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.

leim/quail/japanese.el

index b2e0a459d08bfcd54cb3298280e517f1dd6cf967..42df5372d3716e258495c2b7a9ce3135d3fe1140 100644 (file)
        ((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 ?\e$B$s\e(B))
               ((= (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.