changeset 19453:e6134c179b4c

(quail-terminate-translation): Run input-method-after-insert-chunk-hook only when the current input method doesn't require conversion. (quail-no-conversion): Run input-method-after-insert-chunk-hook.
author Kenichi Handa <handa@m17n.org>
date Fri, 22 Aug 1997 01:22:49 +0000
parents 9cf9cae37598
children 5a08bc0f02d3
files lisp/international/quail.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/quail.el	Fri Aug 22 01:22:17 1997 +0000
+++ b/lisp/international/quail.el	Fri Aug 22 01:22:49 1997 +0000
@@ -974,10 +974,12 @@
 	(set-buffer quail-guidance-buf)
 	(erase-buffer)))
   (setq overriding-terminal-local-map
-	(if (and (overlayp quail-conv-overlay)
-		 (overlay-start quail-conv-overlay))
-	    (quail-conversion-keymap)))
-  (run-hooks 'input-method-after-insert-chunk-hook))
+	(quail-conversion-keymap))
+  ;; Run this hook only when the current input method doesn't require
+  ;; conversion.  When it requires, the conversoin function should run
+  ;; this hook at a proper timing.
+  (unless (quail-conversion-keymap)
+    (run-hooks 'input-method-after-insert-chunk-hook)))
 
 (defun quail-select-current ()
   "Select the current text shown in Quail translation region."
@@ -1281,7 +1283,8 @@
   "Do no conversion of the current conversion region of Quail."
   (interactive)
   (quail-delete-overlays)
-  (setq overriding-terminal-local-map nil))
+  (setq overriding-terminal-local-map nil)
+  (run-hooks 'input-method-after-insert-chunk-hook))
 
 ;; Guidance, Completion, and Help buffer handlers.