Revision: 7327
Author:   deton.kih
Date:     Sat Oct 15 16:47:59 2011
Log:      * scm/tutcode.scm
  - (tutcode-proc-state-bushu):
    Change to show bushu prediction on commit or cancel of
    recursive bushu conversion.
  - (tutcode-begin-bushu-conversion):
    Change to show bushu prediction again on bushu conversion failure.

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

Modified:
 /trunk/scm/tutcode.scm

=======================================
--- /trunk/scm/tutcode.scm      Fri Oct 14 16:12:44 2011
+++ /trunk/scm/tutcode.scm      Sat Oct 15 16:47:59 2011
@@ -3584,7 +3584,12 @@
         ((symbol? res) ;XXX Éô¼ó¹çÀ®ÊÑ´¹Ãæ¤Ï¸ò¤¼½ñ¤­ÊÑ´¹Åù¤Ï̵¸ú¤Ë¤¹¤ë
           (set! res #f)))))
     (if res
-      (tutcode-begin-bushu-conversion pc res))))
+      (tutcode-begin-bushu-conversion pc res)
+      (if (and tutcode-use-bushu-prediction?
+               (pair? (tutcode-context-head pc)))
+        (let ((prevchar (car (tutcode-context-head pc))))
+          (if (not (string=? prevchar "¢¥"))
+            (tutcode-check-bushu-prediction pc prevchar)))))))

 ;;; Éô¼ó¹çÀ®ÊÑ´¹³«»Ï
 ;;; @param char ¿·¤¿¤ËÆþÎϤµ¤ì¤¿Ê¸»ú(2ÈÖÌܤÎÉô¼ó)
@@ -3600,8 +3605,9 @@
         (if (string? convchar)
           ;; ¹çÀ®À®¸ù
           (tutcode-bushu-commit pc convchar)
-          ;; ¹çÀ®¼ºÇÔ»þ¤ÏÆþÎϤ·Ä¾¤·¤òÂÔ¤Ä
-          )))))
+          ;; ¹çÀ®¼ºÇÔ»þ¤ÏÆþÎϤ·Ä¾¤·¤òÂԤġ£Í½Â¬ÆþÎϸõÊä¤ÏºÆÉ½¼¨
+          (if tutcode-use-bushu-prediction?
+            (tutcode-check-bushu-prediction pc prevchar)))))))

 ;;; Éô¼ó¹çÀ®ÊÑ´¹¤ÇÊÑ´¹¤·¤¿Ê¸»ú¤ò³ÎÄꤹ¤ë
 ;;; @param convchar ÊÑ´¹¸å¤Îʸ»ú

Reply via email to