Revision: 6844
Author: deton.kih
Date: Mon Dec 27 02:49:08 2010
Log: * scm/tutcode.scm
- (tutcode-proc-state-yomi):
Add feature to commit as katakana in yomi of mazegaki.
* scm/tutcode-key-custom.scm
- (tutcode-katakana-commit-key): New custom.
http://code.google.com/p/uim/source/detail?r=6844
Modified:
/trunk/scm/tutcode-key-custom.scm
/trunk/scm/tutcode.scm
=======================================
--- /trunk/scm/tutcode-key-custom.scm Mon Dec 27 02:47:03 2010
+++ /trunk/scm/tutcode-key-custom.scm Mon Dec 27 02:49:08 2010
@@ -107,6 +107,12 @@
(N_ "[TUT-Code] display last auto help")
(N_ "long description will be here"))
+(define-custom 'tutcode-katakana-commit-key '()
+ '(tutcode-keys1)
+ '(key)
+ (N_ "[TUT-Code] commit as katakana in yomi input of mazegaki")
+ (N_ "long description will be here"))
+
(define-custom 'tutcode-stroke-help-toggle-key '("<Control>/")
'(tutcode-keys1)
'(key)
=======================================
--- /trunk/scm/tutcode.scm Mon Dec 27 02:47:03 2010
+++ /trunk/scm/tutcode.scm Mon Dec 27 02:49:08 2010
@@ -173,6 +173,7 @@
(require "tutcode-bushudic.scm") ;Éô¼ó¹çÀ®ÊÑ´¹¼½ñ
(require "tutcode-kigoudic.scm") ;µ¹æÆþÎϥ⡼¥ÉÍѤε¹æÉ½
(require "tutcode-dialog.scm"); ¸ò¤¼½ñ¤ÊÑ´¹¼½ñ¤«¤é¤Îºï½ü³Îǧ¥À¥¤¥¢¥í¥°
+(require "japanese.scm") ; for ja-wide or ja-make-kana-str{,-list}
;;; user configs
@@ -679,7 +680,6 @@
;; µ¹æÆþÎϥ⡼¥É¤òÁ´³Ñ±Ñ¿ô¥â¡¼¥É¤È¤·¤Æ»È¤¦¤¿¤á¡¢
;; tutcode-heading-label-char-list-for-kigou-mode¤òÁ´³Ñ¤Ë¤·¤Æ
;; tutcode-kigoudic¤ÎÀèÆ¬¤ËÆþ¤ì¤ë
- (require "japanese.scm") ; for ja-wide
(set! tutcode-kigoudic
(append
(map (lambda (lst) (list (ja-wide lst)))
@@ -2287,6 +2287,14 @@
(not kigou2-mode?))
(tutcode-context-set-state! pc 'tutcode-state-converting)
(tutcode-setup-child-context pc 'tutcode-child-type-editor))
+ ((tutcode-katakana-commit-key? key key-state)
+ (tutcode-commit pc
+ ;;XXX:¤«¤Ê¥«¥Êº®ºß»þ¤Îȿž(¢ª¥«¥Ê¤«¤Ê)¤ä¡¢¡Ö¤ñ¤ð¡×¤Ï̤Âбþ
+ (ja-make-kana-str (ja-make-kana-str-list head)
+ (if (tutcode-context-katakana-mode? pc)
+ ja-type-hiragana
+ ja-type-katakana)))
+ (tutcode-flush pc))
((symbol? key)
(tutcode-flush pc)
(tutcode-proc-state-on pc key key-state))