mlh multilingualization
[elisp/egg.git] / its.el
diff --git a/its.el b/its.el
index 56bab98..0978ba7 100644 (file)
--- a/its.el
+++ b/its.el
@@ -719,16 +719,25 @@ Return last state."
 (defvar its-translation-result nil "")
 
 (defun its-ins/del-SYL-batch (newsyl oldsyl)
+  (let (output)
   (its-update-latest-SYL newsyl)
   (if (and newsyl
           (consp (cdr newsyl))
           (not (its-kst-p (its-get-kst/t newsyl))))
-      ;; DSYL
-      (setq its-translation-result
-           (cons (its-get-output newsyl) its-translation-result))))
-
-(defun its-translate-region (start end &optional map)
+      (progn
+       ;; DSYL
+       (setq output (its-get-output newsyl))
+       (put-text-property 0 (length output)
+                          'its-lang its-current-language output)
+       (setq its-translation-result
+           (cons output its-translation-result))))))
+
+(defun its-translate-region (start end)
   (interactive "r")
+  (its-translate-region-internal start end)
+  (remove-text-properties start (point) '(its-lang nil)))
+
+(defun its-translate-region-internal (start end)
   (setq its-translation-result nil)
   (goto-char start)
   (let ((i 0)