# HG changeset patch # User Kenichi Handa # Date 900985360 0 # Node ID 9ace3533378986bd7e7dd296d9cacac60a0bd2f1 # Parent c3ab1de66dfcdcb5b6cad67347c7a90d4e8723fb (kkc-region): Handled the case that conversion is cancelled. (kkc-terminate): Update kkc-overlay-head correctly. (kkc-cancel): Don't call kkc-terminate, but set kkc-converting to nil. diff -r c3ab1de66dfc -r 9ace35333789 lisp/international/kkc.el --- a/lisp/international/kkc.el Tue Jul 21 01:42:40 1998 +0000 +++ b/lisp/international/kkc.el Tue Jul 21 01:42:40 1998 +0000 @@ -232,17 +232,19 @@ ;; Let's put the event back. (setq unread-input-method-events (append (string-to-list keyseq) unread-input-method-events)) - (setq kkc-converting nil))))) + (kkc-terminate))))) (force-mode-line-update) (goto-char (overlay-end kkc-overlay-tail)) - (prog1 (- (point) from) + (prog1 (- (overlay-start kkc-overlay-head) from) (delete-overlay kkc-overlay-head) (delete-overlay kkc-overlay-tail))) (defun kkc-terminate () "Exit from KKC mode by fixing the current conversion." (interactive) + (goto-char (overlay-end kkc-overlay-tail)) + (move-overlay kkc-overlay-head (point) (point)) (setq kkc-converting nil)) (defun kkc-cancel () @@ -252,7 +254,7 @@ (delete-region (overlay-start kkc-overlay-head) (overlay-end kkc-overlay-tail)) (insert kkc-original-kana) - (kkc-terminate)) + (setq kkc-converting nil)) (defun kkc-first-char-only () "Select only the first character currently converted."