]> git.eshelyaron.com Git - emacs.git/commitdiff
(quail-japanese-kanji-kkc): Handle the case
authorKenichi Handa <handa@m17n.org>
Tue, 21 Jul 1998 01:42:40 +0000 (01:42 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 21 Jul 1998 01:42:40 +0000 (01:42 +0000)
that conversion is cancelled in kkc-region.
(quail-japanese-switch-package): Fix previous change.

leim/quail/japanese.el

index 42df5372d3716e258495c2b7a9ce3135d3fe1140..f1241b452fc851941ee28d530b53ec1cfea64d43 100644 (file)
@@ -76,8 +76,9 @@
        newfrom)
     (quail-delete-overlays)
     (let ((result (kkc-region from to)))
-      (move-overlay quail-conv-overlay (- (point) result) (point)))
-    (setq quail-converting nil)))
+      (move-overlay quail-conv-overlay from (point))
+      (if (= (+ from result) (point))
+         (setq quail-converting nil)))))
 
 (defun quail-japanese-self-insert-and-switch-to-alpha (key idx)
   (quail-delete-region)
@@ -95,6 +96,8 @@
 (put 'quail-japanese-package-saved 'permanent-local t)
 
 (defun quail-japanese-switch-package (key idx)
+  (quail-delete-region)
+  (setq quail-converting nil)
   (let ((pkg (cdr (assq (aref key (1- idx)) quail-japanese-switch-table))))
     (if (null pkg)
        (quail-error "No package to be switched")