• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A multilingual input method framework


Commit MetaInfo

Revisiond069d2724f3873858d504f67f5f9f4aa7d99bb43 (tree)
Time2012-12-24 19:51:31
AuthorKIHARA Hideto <deton@m1.i...>
CommiterKIHARA Hideto

Log Message

Add key customs for postfix katakana conversion with exclude or shrink.

* scm/tutcode-key-custom.scm

- (tutcode-postfix-katakana-0-start-sequence,
tutcode-postfix-katakana-exclude-1-sequence,
tutcode-postfix-katakana-exclude-2-sequence,
tutcode-postfix-katakana-exclude-3-sequence,
tutcode-postfix-katakana-exclude-4-sequence,
tutcode-postfix-katakana-exclude-5-sequence,
tutcode-postfix-katakana-exclude-6-sequence,
tutcode-postfix-katakana-shrink-1-sequence,
tutcode-postfix-katakana-shrink-2-sequence,
tutcode-postfix-katakana-shrink-3-sequence,
tutcode-postfix-katakana-shrink-4-sequence,
tutcode-postfix-katakana-shrink-5-sequence,
tutcode-postfix-katakana-shrink-6-sequence): New key custom.

* scm/tutcode.scm

- (tutcode-stroke-help-update-alist-with-rule):
Add labels for new custom keys.
- (tutcode-proc-state-on):
Add check of new custom keys.
- (tutcode-custom-set-mazegaki/bushu-start-sequence!):
Support new custom keys.

Change Summary

Incremental Difference

--- a/scm/tutcode-key-custom.scm
+++ b/scm/tutcode-key-custom.scm
@@ -435,6 +435,12 @@
435435 (N_ "[TUT-Code] postfix katakana conversion")
436436 (N_ "long description will be here"))
437437
438+(define-custom 'tutcode-postfix-katakana-0-start-sequence ""
439+ '(tutcode-keys3)
440+ '(string ".*")
441+ (N_ "[TUT-Code] postfix katakana conversion while hiragana continues")
442+ (N_ "long description will be here"))
443+
438444 (define-custom 'tutcode-postfix-katakana-1-start-sequence ""
439445 '(tutcode-keys3)
440446 '(string ".*")
@@ -489,6 +495,78 @@
489495 (N_ "[TUT-Code] postfix katakana conversion of 9 characters")
490496 (N_ "long description will be here"))
491497
498+(define-custom 'tutcode-postfix-katakana-exclude-1-sequence ""
499+ '(tutcode-keys3)
500+ '(string ".*")
501+ (N_ "[TUT-Code] postfix katakana conversion excluding 1 character")
502+ (N_ "long description will be here"))
503+
504+(define-custom 'tutcode-postfix-katakana-exclude-2-sequence ""
505+ '(tutcode-keys3)
506+ '(string ".*")
507+ (N_ "[TUT-Code] postfix katakana conversion excluding 2 characters")
508+ (N_ "long description will be here"))
509+
510+(define-custom 'tutcode-postfix-katakana-exclude-3-sequence ""
511+ '(tutcode-keys3)
512+ '(string ".*")
513+ (N_ "[TUT-Code] postfix katakana conversion excluding 3 characters")
514+ (N_ "long description will be here"))
515+
516+(define-custom 'tutcode-postfix-katakana-exclude-4-sequence ""
517+ '(tutcode-keys3)
518+ '(string ".*")
519+ (N_ "[TUT-Code] postfix katakana conversion excluding 4 characters")
520+ (N_ "long description will be here"))
521+
522+(define-custom 'tutcode-postfix-katakana-exclude-5-sequence ""
523+ '(tutcode-keys3)
524+ '(string ".*")
525+ (N_ "[TUT-Code] postfix katakana conversion excluding 5 characters")
526+ (N_ "long description will be here"))
527+
528+(define-custom 'tutcode-postfix-katakana-exclude-6-sequence ""
529+ '(tutcode-keys3)
530+ '(string ".*")
531+ (N_ "[TUT-Code] postfix katakana conversion excluding 6 characters")
532+ (N_ "long description will be here"))
533+
534+(define-custom 'tutcode-postfix-katakana-shrink-1-sequence ""
535+ '(tutcode-keys3)
536+ '(string ".*")
537+ (N_ "[TUT-Code] postfix katakana conversion shrink 1 character")
538+ (N_ "shrink last postfix katakana conversion by 1 character"))
539+
540+(define-custom 'tutcode-postfix-katakana-shrink-2-sequence ""
541+ '(tutcode-keys3)
542+ '(string ".*")
543+ (N_ "[TUT-Code] postfix katakana conversion shrink 2 characters")
544+ (N_ "shrink last postfix katakana conversion by 2 characters"))
545+
546+(define-custom 'tutcode-postfix-katakana-shrink-3-sequence ""
547+ '(tutcode-keys3)
548+ '(string ".*")
549+ (N_ "[TUT-Code] postfix katakana conversion shrink 3 characters")
550+ (N_ "shrink last postfix katakana conversion by 3 characters"))
551+
552+(define-custom 'tutcode-postfix-katakana-shrink-4-sequence ""
553+ '(tutcode-keys3)
554+ '(string ".*")
555+ (N_ "[TUT-Code] postfix katakana conversion shrink 4 characters")
556+ (N_ "shrink last postfix katakana conversion by 4 characters"))
557+
558+(define-custom 'tutcode-postfix-katakana-shrink-5-sequence ""
559+ '(tutcode-keys3)
560+ '(string ".*")
561+ (N_ "[TUT-Code] postfix katakana conversion shrink 5 characters")
562+ (N_ "shrink last postfix katakana conversion by 5 characters"))
563+
564+(define-custom 'tutcode-postfix-katakana-shrink-6-sequence ""
565+ '(tutcode-keys3)
566+ '(string ".*")
567+ (N_ "[TUT-Code] postfix katakana conversion shrink 6 characters")
568+ (N_ "shrink last postfix katakana conversion by 6 characters"))
569+
492570 (define-custom 'tutcode-postfix-kanji2seq-start-sequence ""
493571 '(tutcode-keys3)
494572 '(string ".*")
--- a/scm/tutcode.scm
+++ b/scm/tutcode.scm
@@ -127,10 +127,28 @@
127127 ;;; 活用する語に関しては、読みは指定された文字数で固定して語幹のみ伸縮。
128128 ;;; 例(「あおい」に対して3文字指定):「あおい―」>「あお―」>「あ―」
129129 ;;; * 後置型カタカナ変換は、以下の開始キーを設定すると使用可能になります。
130-;;; tutcode-postfix-katakana-start-sequence
131-;;; 読み1文字 tutcode-postfix-katakana-1-start-sequence
130+;;; 対象伸縮モード tutcode-postfix-katakana-start-sequence
131+;;; カタカナ変換対象の文字列を選択するモードを開始(後置型交ぜ書き変換同様)。
132+;;; ひらがなが続く間 tutcode-postfix-katakana-0-start-sequence
133+;;; ひらがなや「ー」が続く間対象文字列として、カタカナに置換。
134+;;; 対象1文字 tutcode-postfix-katakana-1-start-sequence
132135 ;;; ...
133-;;; 読み9文字 tutcode-postfix-katakana-9-start-sequence
136+;;; 対象9文字 tutcode-postfix-katakana-9-start-sequence
137+;;; 指定文字数をカタカナに置換。
138+;;; 1文字除いて置換 tutcode-postfix-katakana-exclude-1-sequence
139+;;; ...
140+;;; 6文字除いて置換 tutcode-postfix-katakana-exclude-6-sequence
141+;;; 指定文字数をひらがなとして残してカタカナに置換。
142+;;; (カタカナに変換する文字列が長くて文字数を数えるのが面倒な場合向け)
143+;;; 例:「例えばあぷりけーしょん」2文字除いて置換→「例えばアプリケーション」
144+;;; 1文字縮める tutcode-postfix-katakana-shrink-1-sequence
145+;;; ...
146+;;; 6文字縮める tutcode-postfix-katakana-shrink-6-sequence
147+;;; 直前の後置型カタカナ変換を指定文字数縮めます。繰り返し実行可能。
148+;;; 例:「例えばあぷりけーしょん」ひらがなが続く間置換
149+;;; →「例エバアプリケーション」1文字縮める
150+;;; →「例えバアプリケーション」1文字縮める
151+;;; →「例えばアプリケーション」
134152 ;;; * 後置型漢字→入力シーケンス変換
135153 ;;; TUT-Codeオン・オフのモード切り替えなしで英単語を入力して、
136154 ;;; 後から英字化するための機能です。
@@ -2264,6 +2282,7 @@
22642282 ((tutcode-postfix-mazegaki-inflection-9-start) "―9")
22652283 ((tutcode-selection-katakana-start) "カs")
22662284 ((tutcode-postfix-katakana-start) "カ")
2285+ ((tutcode-postfix-katakana-0-start) "カ0")
22672286 ((tutcode-postfix-katakana-1-start) "カ1")
22682287 ((tutcode-postfix-katakana-2-start) "カ2")
22692288 ((tutcode-postfix-katakana-3-start) "カ3")
@@ -2273,6 +2292,18 @@
22732292 ((tutcode-postfix-katakana-7-start) "カ7")
22742293 ((tutcode-postfix-katakana-8-start) "カ8")
22752294 ((tutcode-postfix-katakana-9-start) "カ9")
2295+ ((tutcode-postfix-katakana-exclude-1) "ヵ1")
2296+ ((tutcode-postfix-katakana-exclude-2) "ヵ2")
2297+ ((tutcode-postfix-katakana-exclude-3) "ヵ3")
2298+ ((tutcode-postfix-katakana-exclude-4) "ヵ4")
2299+ ((tutcode-postfix-katakana-exclude-5) "ヵ5")
2300+ ((tutcode-postfix-katakana-exclude-6) "ヵ6")
2301+ ((tutcode-postfix-katakana-shrink-1) "か1")
2302+ ((tutcode-postfix-katakana-shrink-2) "か2")
2303+ ((tutcode-postfix-katakana-shrink-3) "か3")
2304+ ((tutcode-postfix-katakana-shrink-4) "か4")
2305+ ((tutcode-postfix-katakana-shrink-5) "か5")
2306+ ((tutcode-postfix-katakana-shrink-6) "か6")
22762307 ((tutcode-selection-kanji2seq-start) "/s")
22772308 ((tutcode-postfix-kanji2seq-start) "/@")
22782309 ((tutcode-postfix-kanji2seq-1-start) "/1")
@@ -3375,6 +3406,8 @@
33753406 (tutcode-begin-postfix-mazegaki-inflection-conversion pc 9))
33763407 ((tutcode-postfix-katakana-start)
33773408 (tutcode-begin-postfix-katakana-conversion pc #f))
3409+ ((tutcode-postfix-katakana-0-start)
3410+ (tutcode-begin-postfix-katakana-conversion pc 0))
33783411 ((tutcode-postfix-katakana-1-start)
33793412 (tutcode-begin-postfix-katakana-conversion pc 1))
33803413 ((tutcode-postfix-katakana-2-start)
@@ -3393,6 +3426,30 @@
33933426 (tutcode-begin-postfix-katakana-conversion pc 8))
33943427 ((tutcode-postfix-katakana-9-start)
33953428 (tutcode-begin-postfix-katakana-conversion pc 9))
3429+ ((tutcode-postfix-katakana-exclude-1)
3430+ (tutcode-begin-postfix-katakana-conversion pc -1))
3431+ ((tutcode-postfix-katakana-exclude-2)
3432+ (tutcode-begin-postfix-katakana-conversion pc -2))
3433+ ((tutcode-postfix-katakana-exclude-3)
3434+ (tutcode-begin-postfix-katakana-conversion pc -3))
3435+ ((tutcode-postfix-katakana-exclude-4)
3436+ (tutcode-begin-postfix-katakana-conversion pc -4))
3437+ ((tutcode-postfix-katakana-exclude-5)
3438+ (tutcode-begin-postfix-katakana-conversion pc -5))
3439+ ((tutcode-postfix-katakana-exclude-6)
3440+ (tutcode-begin-postfix-katakana-conversion pc -6))
3441+ ((tutcode-postfix-katakana-shrink-1)
3442+ (tutcode-postfix-katakana-shrink pc 1))
3443+ ((tutcode-postfix-katakana-shrink-2)
3444+ (tutcode-postfix-katakana-shrink pc 2))
3445+ ((tutcode-postfix-katakana-shrink-3)
3446+ (tutcode-postfix-katakana-shrink pc 3))
3447+ ((tutcode-postfix-katakana-shrink-4)
3448+ (tutcode-postfix-katakana-shrink pc 4))
3449+ ((tutcode-postfix-katakana-shrink-5)
3450+ (tutcode-postfix-katakana-shrink pc 5))
3451+ ((tutcode-postfix-katakana-shrink-6)
3452+ (tutcode-postfix-katakana-shrink pc 6))
33963453 ((tutcode-postfix-kanji2seq-start)
33973454 (tutcode-begin-postfix-kanji2seq-conversion pc #f))
33983455 ((tutcode-postfix-kanji2seq-1-start)
@@ -3961,14 +4018,6 @@
39614018 ;;; 負の値: 絶対値の文字数をひらがなとして残してカタカナ変換。
39624019 ;;; (カタカナに変換する文字列が長くて文字数を数えるのが面倒な場合向け)
39634020 ;;; 「例えばあぷりけーしょん」alw→「例えばアプリケーション」
3964-;;; ~/.uimでの設定例:
3965-;;; (tutcode-rule-set-sequences!
3966-;;; `(((("a" "l" "l"))
3967-;;; (,(lambda (state pc)
3968-;;; (tutcode-begin-postfix-katakana-conversion pc 0))))
3969-;;; ((("a" "l" "q"))
3970-;;; (,(lambda (state pc)
3971-;;; (tutcode-begin-postfix-katakana-conversion pc -1))))))
39724021 (define (tutcode-begin-postfix-katakana-conversion pc yomi-len)
39734022 (let*
39744023 ((former-all (tutcode-postfix-katakana-acquire-yomi pc
@@ -6657,6 +6706,8 @@
66576706 '(tutcode-postfix-mazegaki-inflection-9-start))
66586707 (make-subrule tutcode-postfix-katakana-start-sequence
66596708 '(tutcode-postfix-katakana-start))
6709+ (make-subrule tutcode-postfix-katakana-0-start-sequence
6710+ '(tutcode-postfix-katakana-0-start))
66606711 (make-subrule tutcode-postfix-katakana-1-start-sequence
66616712 '(tutcode-postfix-katakana-1-start))
66626713 (make-subrule tutcode-postfix-katakana-2-start-sequence
@@ -6675,6 +6726,30 @@
66756726 '(tutcode-postfix-katakana-8-start))
66766727 (make-subrule tutcode-postfix-katakana-9-start-sequence
66776728 '(tutcode-postfix-katakana-9-start))
6729+ (make-subrule tutcode-postfix-katakana-exclude-1-sequence
6730+ '(tutcode-postfix-katakana-exclude-1))
6731+ (make-subrule tutcode-postfix-katakana-exclude-2-sequence
6732+ '(tutcode-postfix-katakana-exclude-2))
6733+ (make-subrule tutcode-postfix-katakana-exclude-3-sequence
6734+ '(tutcode-postfix-katakana-exclude-3))
6735+ (make-subrule tutcode-postfix-katakana-exclude-4-sequence
6736+ '(tutcode-postfix-katakana-exclude-4))
6737+ (make-subrule tutcode-postfix-katakana-exclude-5-sequence
6738+ '(tutcode-postfix-katakana-exclude-5))
6739+ (make-subrule tutcode-postfix-katakana-exclude-6-sequence
6740+ '(tutcode-postfix-katakana-exclude-6))
6741+ (make-subrule tutcode-postfix-katakana-shrink-1-sequence
6742+ '(tutcode-postfix-katakana-shrink-1))
6743+ (make-subrule tutcode-postfix-katakana-shrink-2-sequence
6744+ '(tutcode-postfix-katakana-shrink-2))
6745+ (make-subrule tutcode-postfix-katakana-shrink-3-sequence
6746+ '(tutcode-postfix-katakana-shrink-3))
6747+ (make-subrule tutcode-postfix-katakana-shrink-4-sequence
6748+ '(tutcode-postfix-katakana-shrink-4))
6749+ (make-subrule tutcode-postfix-katakana-shrink-5-sequence
6750+ '(tutcode-postfix-katakana-shrink-5))
6751+ (make-subrule tutcode-postfix-katakana-shrink-6-sequence
6752+ '(tutcode-postfix-katakana-shrink-6))
66786753 (make-subrule tutcode-postfix-kanji2seq-start-sequence
66796754 '(tutcode-postfix-kanji2seq-start))
66806755 (make-subrule tutcode-postfix-kanji2seq-1-start-sequence