Revision: 7379
Author: deton.kih
Date: Thu Dec 1 03:09:40 2011
Log: * scm/tutcode.scm
- (tutcode-undo): Add undo for yomi state.
- (tutcode-proc-state-yomi):
Change to call tutcode-undo-prepare for commit as katakana
and commit as input sequence.
http://code.google.com/p/uim/source/detail?r=7379
Modified:
/trunk/scm/tutcode.scm
=======================================
--- /trunk/scm/tutcode.scm Thu Dec 1 03:04:28 2011
+++ /trunk/scm/tutcode.scm Thu Dec 1 03:09:40 2011
@@ -302,6 +302,7 @@
;;; + Éô¼ó¹çÀ®ÊÑ´¹:
2ʸ»úÌܤÎÉô¼óÆþÎϤˤè¤êÊÑ´¹¡¦³ÎÄ곫»Ï(ÆÃ¤ËºÆµ¢Åª¤Ê¾ì¹ç)
;;; + ´Á»ú¥³¡¼¥ÉÆþÎÏ
;;; + ¸ò¤¼½ñ¤ÊÑ´¹: ¸õÊä¿ô¤¬1¸Ä¤Î»þ¤Î¼«Æ°³ÎÄê
+;;; + ÆÉ¤ßÆþÎÏ»þ¤Î¥«¥¿¥«¥Ê³ÎÄê¡¢´Á»ú¢ªÆþÎÏ¥·¡¼¥±¥ó¥¹³ÎÄê
;;;
;;; ¡Ú¥¯¥ê¥Ã¥×¥Ü¡¼¥É¡Û
;;; ¥¯¥ê¥Ã¥×¥Ü¡¼¥ÉÆâ¤Îʸ»úÎó¤ËÂФ¹¤ë°Ê²¼¤Îµ¡Ç½¤òÄɲä·¤Þ¤·¤¿¡£
@@ -3175,6 +3176,9 @@
((tutcode-state-bushu)
(tutcode-context-set-head! pc data)
(tutcode-context-set-state! pc 'tutcode-state-bushu))
+ ((tutcode-state-yomi)
+ (tutcode-context-set-head! pc data)
+ (tutcode-context-set-state! pc 'tutcode-state-yomi))
((tutcode-state-code)
(tutcode-context-set-head! pc data)
(tutcode-context-set-state! pc 'tutcode-state-code))
@@ -4122,11 +4126,13 @@
(res #f)
(katakana-commit
(lambda ()
- (tutcode-commit pc
- (string-list-concat
- (tutcode-katakana-convert head
- (not (tutcode-context-katakana-mode? pc)))))
- (tutcode-flush pc)))
+ (let ((str
+ (string-list-concat
+ (tutcode-katakana-convert head
+ (not (tutcode-context-katakana-mode? pc))))))
+ (tutcode-commit pc str)
+ (tutcode-flush pc)
+ (tutcode-undo-prepare pc 'tutcode-state-yomi str head))))
(rk-append-flush
(lambda ()
(if tutcode-keep-illegal-sequence?
@@ -4293,11 +4299,12 @@
((eq? res 'tutcode-postfix-kanji2seq-start)
(set! res #f)
(if (not (null? head))
- (begin
- (tutcode-commit pc
- (string-list-concat
- (tutcode-kanji-list->sequence pc head)))
- (tutcode-flush pc))
+ (let ((str
+ (string-list-concat
+ (tutcode-kanji-list->sequence pc head))))
+ (tutcode-commit pc str)
+ (tutcode-flush pc)
+ (tutcode-undo-prepare pc 'tutcode-state-yomi str head))
(begin
(tutcode-flush pc)
(tutcode-begin-postfix-kanji2seq-conversion pc #f))))