Revision: 7151
Author:   deton.kih
Date:     Sun Jun 19 03:48:07 2011
Log:      * scm/tutcode.scm
  - (tutcode-proc-state-on): Avoid to commit-raw tutcode-on-key.
  - (tutcode-proc-state-off): Avoid to commit-raw tutcode-off-key.

http://code.google.com/p/uim/source/detail?r=7151

Modified:
 /trunk/scm/tutcode.scm

=======================================
--- /trunk/scm/tutcode.scm      Sat Jun 11 21:08:57 2011
+++ /trunk/scm/tutcode.scm      Sun Jun 19 03:48:07 2011
@@ -2483,6 +2483,9 @@
            (rk-flush rkc)
            (tutcode-context-set-commit-strs! pc ())
            (tutcode-context-set-state! pc 'tutcode-state-off))
+          ((tutcode-on-key? key key-state) ; off-key¤Èon-key¤¬ÊÌ¥­¡¼¤Î¾ì¹ç
+ ;; ¸½ºßon¤Ç¤âoff¤Ç¤â¡¢on-key¤Çon¤Ë¤·¤¿¤¤¤À¤±¤Ê¤Î¤Çcommit-raw¤ò²óÈò
+           (rk-flush rkc))
           ((tutcode-kigou-toggle-key? key key-state)
            (rk-flush rkc)
            (tutcode-begin-kigou-mode pc))
@@ -2984,9 +2987,13 @@
 ;;; @param key-state ¥³¥ó¥È¥í¡¼¥ë¥­¡¼Åù¤Î¾õÂÖ
 (define (tutcode-proc-state-off c key key-state)
   (let ((pc (tutcode-find-descendant-context c)))
-    (if (tutcode-on-key? key key-state)
-      (tutcode-context-set-state! pc 'tutcode-state-on)
-      (tutcode-commit-raw pc key key-state))))
+    (cond
+      ((tutcode-on-key? key key-state)
+        (tutcode-context-set-state! pc 'tutcode-state-on))
+      ((tutcode-off-key? key key-state) ; on-key¤Èoff-key¤¬ÊÌ¥­¡¼¤Î¾ì¹ç
+ ) ; ¸½ºßon¤Ç¤âoff¤Ç¤â¡¢off-key¤Çoff¤Ë¤·¤¿¤¤¤À¤±¤Ê¤Î¤Çcommit-raw¤ò²óÈò
+      (else
+        (tutcode-commit-raw pc key key-state)))))

 ;;; µ­¹æÆþÎϥ⡼¥É»þ¤Î¥­¡¼ÆþÎϤò½èÍý¤¹¤ë¡£
 ;;; @param c ¥³¥ó¥Æ¥­¥¹¥È¥ê¥¹¥È

Reply via email to