aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--leim/quail/japanese.el19
1 files changed, 4 insertions, 15 deletions
diff --git a/leim/quail/japanese.el b/leim/quail/japanese.el
index 13115b7cf98..b2e0a459d08 100644
--- a/leim/quail/japanese.el
+++ b/leim/quail/japanese.el
@@ -72,18 +72,9 @@
72 (to (overlay-end quail-conv-overlay)) 72 (to (overlay-end quail-conv-overlay))
73 newfrom) 73 newfrom)
74 (quail-delete-overlays) 74 (quail-delete-overlays)
75 (setq overriding-terminal-local-map nil) 75 (let ((result (kkc-region from to)))
76 (kkc-region from to 'quail-japanese-kkc-mode-exit))) 76 (move-overlay quail-conv-overlay (- (point) result) (point)))
77 77 (setq quail-converting nil)))
78;; Function to call on exiting KKC mode. ARG is nil if KKC mode is
79;; exited normally, else ARG is a cons (FROM . TO) where FROM and TO
80;; specify a region not yet processed.
81(defun quail-japanese-kkc-mode-exit (arg)
82 (if arg
83 (progn
84 (setq overriding-terminal-local-map (quail-conversion-keymap))
85 (move-overlay quail-conv-overlay (car arg) (cdr arg)))
86 (run-hooks 'input-method-after-insert-chunk-hook)))
87 78
88(defun quail-japanese-self-insert-and-switch-to-alpha (key idx) 79(defun quail-japanese-self-insert-and-switch-to-alpha (key idx)
89 (quail-delete-region) 80 (quail-delete-region)
@@ -103,9 +94,7 @@
103(defun quail-japanese-switch-package (key idx) 94(defun quail-japanese-switch-package (key idx)
104 (let ((pkg (cdr (assq (aref key (1- idx)) quail-japanese-switch-table)))) 95 (let ((pkg (cdr (assq (aref key (1- idx)) quail-japanese-switch-table))))
105 (if (null pkg) 96 (if (null pkg)
106 (error "No package to be switched") 97 (quail-error "No package to be switched")
107 (setq overriding-terminal-local-map nil)
108 (quail-delete-region)
109 (if (stringp pkg) 98 (if (stringp pkg)
110 (activate-input-method pkg) 99 (activate-input-method pkg)
111 (if (string= (car pkg) current-input-method) 100 (if (string= (car pkg) current-input-method)