Author: ek.kato
Date: Tue Mar  3 07:42:54 2009
New Revision: 5889

Modified:
   trunk/scm/anthy-utf8.scm
   trunk/scm/anthy.scm
   trunk/scm/social-ime.scm
   trunk/scm/yahoo-jp.scm

Log:
* scm/anthy.scm
  - (anthy-proc-input-state-with-preedit)
  - (anthy-proc-prediction-state)
* scm/anthy-utf8.scm
  - (anthy-utf8-proc-input-state-with-preedit)  
  - (anthy-utf8-proc-prediction-state)
* scm/yahoo-jp.scm
  - (yahoo-jp-proc-input-state-with-preedit)
  - (yahoo-jp-proc-prediction-state)
* scm/social-ime.scm
  - (social-ime-proc-input-state-with-preedit)
  - (social-ime-proc-prediction-state)
    - Revert changes in r5887 and do reset in the prediction-state
      for that purpose.


Modified: trunk/scm/anthy-utf8.scm
==============================================================================
--- trunk/scm/anthy-utf8.scm    (original)
+++ trunk/scm/anthy-utf8.scm    Tue Mar  3 07:42:54 2009
@@ -1038,6 +1038,8 @@
          (begin
            (anthy-utf8-context-set-predicting! ac #f)
            (anthy-utf8-context-set-prediction-index! ac #f)
+           (if (not anthy-use-prediction?)
+               (anthy-utf8-reset-prediction-window ac))
            (anthy-utf8-proc-input-state ac key key-state)))))))

 (define anthy-utf8-proc-input-state-with-preedit
@@ -1060,8 +1062,6 @@

        ;; backspace
        ((anthy-backspace-key? key key-state)
-       (if (not anthy-use-prediction?)
-           (anthy-utf8-reset-prediction-window ac))
        (if (not (rk-backspace rkc))
             (begin
              (ustr-cursor-delete-backside! preconv-str)
@@ -1077,8 +1077,6 @@

        ;; delete
        ((anthy-delete-key? key key-state)
-       (if (not anthy-use-prediction?)
-           (anthy-utf8-reset-prediction-window ac))
        (if (not (rk-delete rkc))
             (begin
              (ustr-cursor-delete-frontside! preconv-str)
@@ -1086,15 +1084,11 @@

        ;; kill
        ((anthy-kill-key? key key-state)
-       (if (not anthy-use-prediction?)
-           (anthy-utf8-reset-prediction-window ac))
        (ustr-clear-latter! preconv-str)
        (ustr-clear-latter! raw-str))

        ;; kill-backward
        ((anthy-kill-backward-key? key key-state)
-       (if (not anthy-use-prediction?)
-           (anthy-utf8-reset-prediction-window ac))
        (rk-flush rkc)
        (ustr-clear-former! preconv-str)
        (ustr-clear-former! raw-str))
@@ -1233,8 +1227,6 @@

        (else   
        ;; handle "n1" sequence as "ん1"
-       (if (not anthy-use-prediction?)
-           (anthy-utf8-reset-prediction-window ac))
        (if (and (not (anthy-utf8-context-alnum ac))
                 (not (ichar-alphabetic? key))
                 (not (string-find

Modified: trunk/scm/anthy.scm
==============================================================================
--- trunk/scm/anthy.scm (original)
+++ trunk/scm/anthy.scm Tue Mar  3 07:42:54 2009
@@ -1033,6 +1033,8 @@
          (begin
            (anthy-context-set-predicting! ac #f)
            (anthy-context-set-prediction-index! ac #f)
+           (if (not anthy-use-prediction?)
+               (anthy-reset-prediction-window ac))
            (anthy-proc-input-state ac key key-state)))))))

 (define anthy-proc-input-state-with-preedit
@@ -1055,8 +1057,6 @@

        ;; backspace
        ((anthy-backspace-key? key key-state)
-       (if (not anthy-use-prediction?)
-           (anthy-reset-prediction-window ac))
        (if (not (rk-backspace rkc))
             (begin
              (ustr-cursor-delete-backside! preconv-str)
@@ -1072,8 +1072,6 @@

        ;; delete
        ((anthy-delete-key? key key-state)
-       (if (not anthy-use-prediction?)
-           (anthy-reset-prediction-window ac))
        (if (not (rk-delete rkc))
             (begin
              (ustr-cursor-delete-frontside! preconv-str)
@@ -1081,15 +1079,11 @@

        ;; kill
        ((anthy-kill-key? key key-state)
-       (if (not anthy-use-prediction?)
-           (anthy-reset-prediction-window ac))
        (ustr-clear-latter! preconv-str)
        (ustr-clear-latter! raw-str))

        ;; kill-backward
        ((anthy-kill-backward-key? key key-state)
-       (if (not anthy-use-prediction?)
-           (anthy-reset-prediction-window ac))
        (rk-flush rkc)
        (ustr-clear-former! preconv-str)
        (ustr-clear-former! raw-str))
@@ -1228,8 +1222,6 @@

        (else   
        ;; handle "n1" sequence as "��1"
-       (if (not anthy-use-prediction?)
-           (anthy-reset-prediction-window ac))
        (if (and (not (anthy-context-alnum ac))
                 (not (ichar-alphabetic? key))
                 (not (string-find

Modified: trunk/scm/social-ime.scm
==============================================================================
--- trunk/scm/social-ime.scm    (original)
+++ trunk/scm/social-ime.scm    Tue Mar  3 07:42:54 2009
@@ -1082,6 +1082,8 @@
        (begin
          (social-ime-context-set-predicting! sc #f)
          (social-ime-context-set-prediction-index! sc #f)
+         (if (not social-ime-use-prediction?)
+             (social-ime-reset-prediction-window sc))
          (social-ime-proc-input-state sc key key-state))))))

 (define (social-ime-proc-input-state-with-preedit sc key key-state)
@@ -1102,8 +1104,6 @@

      ;; backspace
      ((social-ime-backspace-key? key key-state)
-      (if (not social-ime-use-prediction?)
-         (social-ime-reset-prediction-window sc))
       (if (not (rk-backspace rkc))
          (begin
            (ustr-cursor-delete-backside! preconv-str)
@@ -1119,8 +1119,6 @@

      ;; delete
      ((social-ime-delete-key? key key-state)
-      (if (not social-ime-use-prediction?)
-         (social-ime-reset-prediction-window sc))
       (if (not (rk-delete rkc))
          (begin
            (ustr-cursor-delete-frontside! preconv-str)
@@ -1128,15 +1126,11 @@

        ;; kill
      ((social-ime-kill-key? key key-state)
-      (if (not social-ime-use-prediction?)
-         (social-ime-reset-prediction-window sc))
       (ustr-clear-latter! preconv-str)
       (ustr-clear-latter! raw-str))

      ;; kill-backward
      ((social-ime-kill-backward-key? key key-state)
-      (if (not social-ime-use-prediction?)
-         (social-ime-reset-prediction-window sc))
       (rk-flush rkc)
       (ustr-clear-former! preconv-str)
       (ustr-clear-former! raw-str))
@@ -1259,8 +1253,6 @@

      (else
       ;; handle "n1" sequence as "��1"
-      (if (not social-ime-use-prediction?)
-         (social-ime-reset-prediction-window sc))
       (if (and (not (social-ime-context-alnum sc))
               (not (ichar-alphabetic? key))
               (not (string-find

Modified: trunk/scm/yahoo-jp.scm
==============================================================================
--- trunk/scm/yahoo-jp.scm      (original)
+++ trunk/scm/yahoo-jp.scm      Tue Mar  3 07:42:54 2009
@@ -1109,6 +1109,8 @@
        (begin
          (yahoo-jp-context-set-predicting! yc #f)
          (yahoo-jp-context-set-prediction-index! yc #f)
+         (if (not yahoo-jp-use-prediction?)
+             (yahoo-jp-reset-prediction-window yc))
          (yahoo-jp-proc-input-state yc key key-state))))))

 (define (yahoo-jp-proc-input-state-with-preedit yc key key-state)
@@ -1128,8 +1130,6 @@

      ;; backspace
      ((yahoo-jp-backspace-key? key key-state)
-      (if (not yahoo-jp-use-prediction?)
-         (yahoo-jp-reset-prediction-window yc))
       (if (not (rk-backspace rkc))
          (begin
            (ustr-cursor-delete-backside! preconv-str)
@@ -1145,8 +1145,6 @@

      ;; delete
      ((yahoo-jp-delete-key? key key-state)
-      (if (not yahoo-jp-use-prediction?)
-         (yahoo-jp-reset-prediction-window yc))
       (if (not (rk-delete rkc))
          (begin
            (ustr-cursor-delete-frontside! preconv-str)
@@ -1154,15 +1152,11 @@

        ;; kill
      ((yahoo-jp-kill-key? key key-state)
-      (if (not yahoo-jp-use-prediction?)
-         (yahoo-jp-reset-prediction-window yc))
       (ustr-clear-latter! preconv-str)
       (ustr-clear-latter! raw-str))

      ;; kill-backward
      ((yahoo-jp-kill-backward-key? key key-state)
-      (if (not yahoo-jp-use-prediction?)
-         (yahoo-jp-reset-prediction-window yc))
       (rk-flush rkc)
       (ustr-clear-former! preconv-str)
       (ustr-clear-former! raw-str))
@@ -1285,8 +1279,6 @@

      (else
       ;; handle "n1" sequence as "��1"
-      (if (not yahoo-jp-use-prediction?)
-         (yahoo-jp-reset-prediction-window yc))
       (if (and (not (yahoo-jp-context-alnum yc))
               (not (ichar-alphabetic? key))
               (not (string-find

Reply via email to