Mercurial > emacs
changeset 36832:f40b8211dbe0
(quail-japanese-transliteration-rules): New variable. Use it to
define these input methods: "japanese", "japanese-hiragana",
"japanese-katakana".
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 16 Mar 2001 08:18:41 +0000 |
parents | 6e6acbca47d7 |
children | 96b2d9e4ef6d |
files | leim/quail/japanese.el |
diffstat | 1 files changed, 129 insertions(+), 121 deletions(-) [+] |
line wrap: on
line diff
--- a/leim/quail/japanese.el Fri Mar 16 08:17:37 2001 +0000 +++ b/leim/quail/japanese.el Fri Mar 16 08:18:41 2001 +0000 @@ -130,6 +130,124 @@ (activate-input-method (car pkg)))))) (throw 'quail-tag nil)) +(defvar quail-japanese-transliteration-rules + '(( "a" "$B$"(B") ( "i" "$B$$(B") ( "u" "$B$&(B") ( "e" "$B$((B") ( "o" "$B$*(B") + ("ka" "$B$+(B") ("ki" "$B$-(B") ("ku" "$B$/(B") ("ke" "$B$1(B") ("ko" "$B$3(B") + ("sa" "$B$5(B") ("si" "$B$7(B") ("su" "$B$9(B") ("se" "$B$;(B") ("so" "$B$=(B") + ("ta" "$B$?(B") ("ti" "$B$A(B") ("tu" "$B$D(B") ("te" "$B$F(B") ("to" "$B$H(B") + ("na" "$B$J(B") ("ni" "$B$K(B") ("nu" "$B$L(B") ("ne" "$B$M(B") ("no" "$B$N(B") + ("ha" "$B$O(B") ("hi" "$B$R(B") ("hu" "$B$U(B") ("he" "$B$X(B") ("ho" "$B$[(B") + ("ma" "$B$^(B") ("mi" "$B$_(B") ("mu" "$B$`(B") ("me" "$B$a(B") ("mo" "$B$b(B") + ("ya" "$B$d(B") ("yu" "$B$f(B") ("yo" "$B$h(B") + ("ra" "$B$i(B") ("ri" "$B$j(B") ("ru" "$B$k(B") ("re" "$B$l(B") ("ro" "$B$m(B") + ("la" "$B$i(B") ("li" "$B$j(B") ("lu" "$B$k(B") ("le" "$B$l(B") ("lo" "$B$m(B") + ("wa" "$B$o(B") ("wi" "$B$p(B") ("wu" "$B$&(B") ("we" "$B$q(B") ("wo" "$B$r(B") + ("n'" "$B$s(B") + ("ga" "$B$,(B") ("gi" "$B$.(B") ("gu" "$B$0(B") ("ge" "$B$2(B") ("go" "$B$4(B") + ("za" "$B$6(B") ("zi" "$B$8(B") ("zu" "$B$:(B") ("ze" "$B$<(B") ("zo" "$B$>(B") + ("da" "$B$@(B") ("di" "$B$B(B") ("du" "$B$E(B") ("de" "$B$G(B") ("do" "$B$I(B") + ("ba" "$B$P(B") ("bi" "$B$S(B") ("bu" "$B$V(B") ("be" "$B$Y(B") ("bo" "$B$\(B") + ("pa" "$B$Q(B") ("pi" "$B$T(B") ("pu" "$B$W(B") ("pe" "$B$Z(B") ("po" "$B$](B") + + ("kya" ["$B$-$c(B"]) ("kyu" ["$B$-$e(B"]) ("kye" ["$B$-$'(B"]) ("kyo" ["$B$-$g(B"]) + ("sya" ["$B$7$c(B"]) ("syu" ["$B$7$e(B"]) ("sye" ["$B$7$'(B"]) ("syo" ["$B$7$g(B"]) + ("sha" ["$B$7$c(B"]) ("shu" ["$B$7$e(B"]) ("she" ["$B$7$'(B"]) ("sho" ["$B$7$g(B"]) + ("cha" ["$B$A$c(B"]) ("chu" ["$B$A$e(B"]) ("che" ["$B$A$'(B"]) ("cho" ["$B$A$g(B"]) + ("tya" ["$B$A$c(B"]) ("tyu" ["$B$A$e(B"]) ("tye" ["$B$A$'(B"]) ("tyo" ["$B$A$g(B"]) + ("nya" ["$B$K$c(B"]) ("nyu" ["$B$K$e(B"]) ("nye" ["$B$K$'(B"]) ("nyo" ["$B$K$g(B"]) + ("hya" ["$B$R$c(B"]) ("hyu" ["$B$R$e(B"]) ("hye" ["$B$R$'(B"]) ("hyo" ["$B$R$g(B"]) + ("mya" ["$B$_$c(B"]) ("myu" ["$B$_$e(B"]) ("mye" ["$B$_$'(B"]) ("myo" ["$B$_$g(B"]) + ("rya" ["$B$j$c(B"]) ("ryu" ["$B$j$e(B"]) ("rye" ["$B$j$'(B"]) ("ryo" ["$B$j$g(B"]) + ("lya" ["$B$j$c(B"]) ("lyu" ["$B$j$e(B"]) ("lye" ["$B$j$'(B"]) ("lyo" ["$B$j$g(B"]) + ("gya" ["$B$.$c(B"]) ("gyu" ["$B$.$e(B"]) ("gye" ["$B$.$'(B"]) ("gyo" ["$B$.$g(B"]) + ("zya" ["$B$8$c(B"]) ("zyu" ["$B$8$e(B"]) ("zye" ["$B$8$'(B"]) ("zyo" ["$B$8$g(B"]) + ("jya" ["$B$8$c(B"]) ("jyu" ["$B$8$e(B"]) ("jye" ["$B$8$'(B"]) ("jyo" ["$B$8$g(B"]) + ( "ja" ["$B$8$c(B"]) ( "ju" ["$B$8$e(B"]) ( "je" ["$B$8$'(B"]) ( "jo" ["$B$8$g(B"]) + ("bya" ["$B$S$c(B"]) ("byu" ["$B$S$e(B"]) ("bye" ["$B$S$'(B"]) ("byo" ["$B$S$g(B"]) + ("pya" ["$B$T$c(B"]) ("pyu" ["$B$T$e(B"]) ("pye" ["$B$T$'(B"]) ("pyo" ["$B$T$g(B"]) + + ("kwa" ["$B$/$n(B"]) ("kwi" ["$B$/$#(B"]) ("kwe" ["$B$/$'(B"]) ("kwo" ["$B$/$)(B"]) + ("tsa" ["$B$D$!(B"]) ("tsi" ["$B$D$#(B"]) ("tse" ["$B$D$'(B"]) ("tso" ["$B$D$)(B"]) + ( "fa" ["$B$U$!(B"]) ( "fi" ["$B$U$#(B"]) ( "fe" ["$B$U$'(B"]) ( "fo" ["$B$U$)(B"]) + ("gwa" ["$B$0$n(B"]) ("gwi" ["$B$0$#(B"]) ("gwe" ["$B$0$'(B"]) ("gwo" ["$B$0$)(B"]) + + ("dyi" ["$B$G$#(B"]) ("dyu" ["$B$I$%(B"]) ("dye" ["$B$G$'(B"]) ("dyo" ["$B$I$)(B"]) + ("xwi" ["$B$&$#(B"]) ("xwe" ["$B$&$'(B"]) ("xwo" ["$B$&$)(B"]) + + ("shi" "$B$7(B") ("tyi" ["$B$F$#(B"]) ("chi" "$B$A(B") ("tsu" "$B$D(B") ("ji" "$B$8(B") + ("fu" "$B$U(B") + ("ye" ["$B$$$'(B"]) + + ("va" ["$B%t$!(B"]) ("vi" ["$B%t$#(B"]) ("vu" "$B%t(B") ("ve" ["$B%t$'(B"]) ("vo" ["$B%t$)(B"]) + + ("xa" "$B$!(B") ("xi" "$B$#(B") ("xu" "$B$%(B") ("xe" "$B$'(B") ("xo" "$B$)(B") + ("xtu" "$B$C(B") ("xya" "$B$c(B") ("xyu" "$B$e(B") ("xyo" "$B$g(B") ("xwa" "$B$n(B") + ("xka" "$B%u(B") ("xke" "$B%v(B") + + ("1" "$B#1(B") ("2" "$B#2(B") ("3" "$B#3(B") ("4" "$B#4(B") ("5" "$B#5(B") + ("6" "$B#6(B") ("7" "$B#7(B") ("8" "$B#8(B") ("9" "$B#9(B") ("0" "$B#0(B") + + ("!" "$B!*(B") ("@" "$B!w(B") ("#" "$B!t(B") ("$" "$B!p(B") ("%" "$B!s(B") + ("^" "$B!0(B") ("&" "$B!u(B") ("*" "$B!v(B") ("(" "$B!J(B") (")" "$B!K(B") + ("-" "$B!<(B") ("=" "$B!a(B") ("`" "$B!.(B") ("\\" "$B!o(B") ("|" "$B!C(B") + ("_" "$B!2(B") ("+" "$B!\(B") ("~" "$B!1(B") ("[" "$B!V(B") ("]" "$B!W(B") + ("{" "$B!P(B") ("}" "$B!Q(B") (":" "$B!'(B") (";" "$B!((B") ("\"" "$B!I(B") + ("'" "$B!G(B") ("." "$B!#(B") ("," "$B!"(B") ("<" "$B!c(B") (">" "$B!d(B") + ("?" "$B!)(B") ("/" "$B!?(B") + + ("z1" "$B!{(B") ("z!" "$B!|(B") + ("z2" "$B"&(B") ("z@" "$B"'(B") + ("z3" "$B"$(B") ("z#" "$B"%(B") + ("z4" "$B""(B") ("z$" "$B"#(B") + ("z5" "$B!~(B") ("z%" "$B"!(B") + ("z6" "$B!y(B") ("z^" "$B!z(B") + ("z7" "$B!}(B") ("z&" "$B!r(B") + ("z8" "$B!q(B") ("z*" "$B!_(B") + ("z9" "$B!i(B") ("z(" "$B!Z(B") + ("z0" "$B!j(B") ("z)" "$B![(B") + ("z-" "$B!A(B") ("z_" "$B!h(B") + ("z=" "$B!b(B") ("z+" "$B!^(B") + ("z\\" "$B!@(B") ("z|" "$B!B(B") + ("z`" "$B!-(B") ("z~" "$B!/(B") + + ("zq" "$B!T(B") ("zQ" "$B!R(B") + ("zw" "$B!U(B") ("zW" "$B!S(B") + ("zr" "$B!9(B") ("zR" "$B!8(B") + ("zt" "$B!:(B") ("zT" "$B!x(B") + ("zp" "$B")(B") ("zP" "$B",(B") + ("z[" "$B!X(B") ("z{" "$B!L(B") + ("z]" "$B!Y(B") ("z}" "$B!M(B") + + ("zs" "$B!3(B") ("zS" "$B!4(B") + ("zd" "$B!5(B") ("zD" "$B!6(B") + ("zf" "$B!7(B") ("zF" "$B"*(B") + ("zg" "$B!>(B") ("zG" "$B!=(B") + ("zh" "$B"+(B") + ("zj" "$B"-(B") + ("zk" "$B",(B") + ("zl" "$B"*(B") + ("z;" "$B!+(B") ("z:" "$B!,(B") + ("z\'" "$B!F(B") ("z\"" "$B!H(B") + + ("zx" [":-"]) ("zX" [":-)"]) + ("zc" "$B!;(B") ("zC" "$B!n(B") + ("zv" "$B"((B") ("zV" "$B!`(B") + ("zb" "$B!k(B") ("zB" "$B"+(B") + ("zn" "$B!l(B") ("zN" "$B"-(B") + ("zm" "$B!m(B") ("zM" "$B".(B") + ("z," "$B!E(B") ("z<" "$B!e(B") + ("z." "$B!D(B") ("z>" "$B!f(B") + ("z/" "$B!&(B") ("z?" "$B!g(B") + + ("\\\\" quail-japanese-self-insert-and-switch-to-alpha) + ("{{" quail-japanese-self-insert-and-switch-to-alpha) + ("}}" quail-japanese-self-insert-and-switch-to-alpha) + + ("qq" quail-japanese-switch-package) + ("qz" quail-japanese-switch-package) + )) + + ;; $B%m!<%^;zF~NO5Z$S2>L>4A;zJQ49$K$h$kF|K\8lF~NO%a%=%C%I(B ;; ;; $B$3$NF~NO%a%=%C%I$G$NF|K\8l$NF~NO$OFs$D$N%9%F!<%8!V%m!<%^;z2>L>JQ49!W(B @@ -298,124 +416,8 @@ ([return] . quail-no-conversion)) ) -(quail-define-rules - -( "a" "$B$"(B") ( "i" "$B$$(B") ( "u" "$B$&(B") ( "e" "$B$((B") ( "o" "$B$*(B") -("ka" "$B$+(B") ("ki" "$B$-(B") ("ku" "$B$/(B") ("ke" "$B$1(B") ("ko" "$B$3(B") -("sa" "$B$5(B") ("si" "$B$7(B") ("su" "$B$9(B") ("se" "$B$;(B") ("so" "$B$=(B") -("ta" "$B$?(B") ("ti" "$B$A(B") ("tu" "$B$D(B") ("te" "$B$F(B") ("to" "$B$H(B") -("na" "$B$J(B") ("ni" "$B$K(B") ("nu" "$B$L(B") ("ne" "$B$M(B") ("no" "$B$N(B") -("ha" "$B$O(B") ("hi" "$B$R(B") ("hu" "$B$U(B") ("he" "$B$X(B") ("ho" "$B$[(B") -("ma" "$B$^(B") ("mi" "$B$_(B") ("mu" "$B$`(B") ("me" "$B$a(B") ("mo" "$B$b(B") -("ya" "$B$d(B") ("yu" "$B$f(B") ("yo" "$B$h(B") -("ra" "$B$i(B") ("ri" "$B$j(B") ("ru" "$B$k(B") ("re" "$B$l(B") ("ro" "$B$m(B") -("la" "$B$i(B") ("li" "$B$j(B") ("lu" "$B$k(B") ("le" "$B$l(B") ("lo" "$B$m(B") -("wa" "$B$o(B") ("wi" "$B$p(B") ("wu" "$B$&(B") ("we" "$B$q(B") ("wo" "$B$r(B") -("n'" "$B$s(B") -("ga" "$B$,(B") ("gi" "$B$.(B") ("gu" "$B$0(B") ("ge" "$B$2(B") ("go" "$B$4(B") -("za" "$B$6(B") ("zi" "$B$8(B") ("zu" "$B$:(B") ("ze" "$B$<(B") ("zo" "$B$>(B") -("da" "$B$@(B") ("di" "$B$B(B") ("du" "$B$E(B") ("de" "$B$G(B") ("do" "$B$I(B") -("ba" "$B$P(B") ("bi" "$B$S(B") ("bu" "$B$V(B") ("be" "$B$Y(B") ("bo" "$B$\(B") -("pa" "$B$Q(B") ("pi" "$B$T(B") ("pu" "$B$W(B") ("pe" "$B$Z(B") ("po" "$B$](B") - -("kya" ["$B$-$c(B"]) ("kyu" ["$B$-$e(B"]) ("kye" ["$B$-$'(B"]) ("kyo" ["$B$-$g(B"]) -("sya" ["$B$7$c(B"]) ("syu" ["$B$7$e(B"]) ("sye" ["$B$7$'(B"]) ("syo" ["$B$7$g(B"]) -("sha" ["$B$7$c(B"]) ("shu" ["$B$7$e(B"]) ("she" ["$B$7$'(B"]) ("sho" ["$B$7$g(B"]) -("cha" ["$B$A$c(B"]) ("chu" ["$B$A$e(B"]) ("che" ["$B$A$'(B"]) ("cho" ["$B$A$g(B"]) -("tya" ["$B$A$c(B"]) ("tyu" ["$B$A$e(B"]) ("tye" ["$B$A$'(B"]) ("tyo" ["$B$A$g(B"]) -("nya" ["$B$K$c(B"]) ("nyu" ["$B$K$e(B"]) ("nye" ["$B$K$'(B"]) ("nyo" ["$B$K$g(B"]) -("hya" ["$B$R$c(B"]) ("hyu" ["$B$R$e(B"]) ("hye" ["$B$R$'(B"]) ("hyo" ["$B$R$g(B"]) -("mya" ["$B$_$c(B"]) ("myu" ["$B$_$e(B"]) ("mye" ["$B$_$'(B"]) ("myo" ["$B$_$g(B"]) -("rya" ["$B$j$c(B"]) ("ryu" ["$B$j$e(B"]) ("rye" ["$B$j$'(B"]) ("ryo" ["$B$j$g(B"]) -("lya" ["$B$j$c(B"]) ("lyu" ["$B$j$e(B"]) ("lye" ["$B$j$'(B"]) ("lyo" ["$B$j$g(B"]) -("gya" ["$B$.$c(B"]) ("gyu" ["$B$.$e(B"]) ("gye" ["$B$.$'(B"]) ("gyo" ["$B$.$g(B"]) -("zya" ["$B$8$c(B"]) ("zyu" ["$B$8$e(B"]) ("zye" ["$B$8$'(B"]) ("zyo" ["$B$8$g(B"]) -("jya" ["$B$8$c(B"]) ("jyu" ["$B$8$e(B"]) ("jye" ["$B$8$'(B"]) ("jyo" ["$B$8$g(B"]) -( "ja" ["$B$8$c(B"]) ( "ju" ["$B$8$e(B"]) ( "je" ["$B$8$'(B"]) ( "jo" ["$B$8$g(B"]) -("bya" ["$B$S$c(B"]) ("byu" ["$B$S$e(B"]) ("bye" ["$B$S$'(B"]) ("byo" ["$B$S$g(B"]) -("pya" ["$B$T$c(B"]) ("pyu" ["$B$T$e(B"]) ("pye" ["$B$T$'(B"]) ("pyo" ["$B$T$g(B"]) - -("kwa" ["$B$/$n(B"]) ("kwi" ["$B$/$#(B"]) ("kwe" ["$B$/$'(B"]) ("kwo" ["$B$/$)(B"]) -("tsa" ["$B$D$!(B"]) ("tsi" ["$B$D$#(B"]) ("tse" ["$B$D$'(B"]) ("tso" ["$B$D$)(B"]) -( "fa" ["$B$U$!(B"]) ( "fi" ["$B$U$#(B"]) ( "fe" ["$B$U$'(B"]) ( "fo" ["$B$U$)(B"]) -("gwa" ["$B$0$n(B"]) ("gwi" ["$B$0$#(B"]) ("gwe" ["$B$0$'(B"]) ("gwo" ["$B$0$)(B"]) - -("dyi" ["$B$G$#(B"]) ("dyu" ["$B$I$%(B"]) ("dye" ["$B$G$'(B"]) ("dyo" ["$B$I$)(B"]) -("xwi" ["$B$&$#(B"]) ("xwe" ["$B$&$'(B"]) ("xwo" ["$B$&$)(B"]) - -("shi" "$B$7(B") ("tyi" ["$B$F$#(B"]) ("chi" "$B$A(B") ("tsu" "$B$D(B") ("ji" "$B$8(B") -("fu" "$B$U(B") -("ye" ["$B$$$'(B"]) - -("va" ["$B%t$!(B"]) ("vi" ["$B%t$#(B"]) ("vu" "$B%t(B") ("ve" ["$B%t$'(B"]) ("vo" ["$B%t$)(B"]) - -("xa" "$B$!(B") ("xi" "$B$#(B") ("xu" "$B$%(B") ("xe" "$B$'(B") ("xo" "$B$)(B") -("xtu" "$B$C(B") ("xya" "$B$c(B") ("xyu" "$B$e(B") ("xyo" "$B$g(B") ("xwa" "$B$n(B") -("xka" "$B%u(B") ("xke" "$B%v(B") - -("1" "$B#1(B") ("2" "$B#2(B") ("3" "$B#3(B") ("4" "$B#4(B") ("5" "$B#5(B") -("6" "$B#6(B") ("7" "$B#7(B") ("8" "$B#8(B") ("9" "$B#9(B") ("0" "$B#0(B") - -("!" "$B!*(B") ("@" "$B!w(B") ("#" "$B!t(B") ("$" "$B!p(B") ("%" "$B!s(B") -("^" "$B!0(B") ("&" "$B!u(B") ("*" "$B!v(B") ("(" "$B!J(B") (")" "$B!K(B") -("-" "$B!<(B") ("=" "$B!a(B") ("`" "$B!.(B") ("\\" "$B!o(B") ("|" "$B!C(B") -("_" "$B!2(B") ("+" "$B!\(B") ("~" "$B!1(B") ("[" "$B!V(B") ("]" "$B!W(B") -("{" "$B!P(B") ("}" "$B!Q(B") (":" "$B!'(B") (";" "$B!((B") ("\"" "$B!I(B") -("'" "$B!G(B") ("." "$B!#(B") ("," "$B!"(B") ("<" "$B!c(B") (">" "$B!d(B") -("?" "$B!)(B") ("/" "$B!?(B") - -("z1" "$B!{(B") ("z!" "$B!|(B") -("z2" "$B"&(B") ("z@" "$B"'(B") -("z3" "$B"$(B") ("z#" "$B"%(B") -("z4" "$B""(B") ("z$" "$B"#(B") -("z5" "$B!~(B") ("z%" "$B"!(B") -("z6" "$B!y(B") ("z^" "$B!z(B") -("z7" "$B!}(B") ("z&" "$B!r(B") -("z8" "$B!q(B") ("z*" "$B!_(B") -("z9" "$B!i(B") ("z(" "$B!Z(B") -("z0" "$B!j(B") ("z)" "$B![(B") -("z-" "$B!A(B") ("z_" "$B!h(B") -("z=" "$B!b(B") ("z+" "$B!^(B") -("z\\" "$B!@(B") ("z|" "$B!B(B") -("z`" "$B!-(B") ("z~" "$B!/(B") - -("zq" "$B!T(B") ("zQ" "$B!R(B") -("zw" "$B!U(B") ("zW" "$B!S(B") -("zr" "$B!9(B") ("zR" "$B!8(B") -("zt" "$B!:(B") ("zT" "$B!x(B") -("zp" "$B")(B") ("zP" "$B",(B") -("z[" "$B!X(B") ("z{" "$B!L(B") -("z]" "$B!Y(B") ("z}" "$B!M(B") - -("zs" "$B!3(B") ("zS" "$B!4(B") -("zd" "$B!5(B") ("zD" "$B!6(B") -("zf" "$B!7(B") ("zF" "$B"*(B") -("zg" "$B!>(B") ("zG" "$B!=(B") -("zh" "$B"+(B") -("zj" "$B"-(B") -("zk" "$B",(B") -("zl" "$B"*(B") -("z;" "$B!+(B") ("z:" "$B!,(B") -("z\'" "$B!F(B") ("z\"" "$B!H(B") - -("zx" [":-"]) ("zX" [":-)"]) -("zc" "$B!;(B") ("zC" "$B!n(B") -("zv" "$B"((B") ("zV" "$B!`(B") -("zb" "$B!k(B") ("zB" "$B"+(B") -("zn" "$B!l(B") ("zN" "$B"-(B") -("zm" "$B!m(B") ("zM" "$B".(B") -("z," "$B!E(B") ("z<" "$B!e(B") -("z." "$B!D(B") ("z>" "$B!f(B") -("z/" "$B!&(B") ("z?" "$B!g(B") - -("\\\\" quail-japanese-self-insert-and-switch-to-alpha) -("{{" quail-japanese-self-insert-and-switch-to-alpha) -("}}" quail-japanese-self-insert-and-switch-to-alpha) - -("qq" quail-japanese-switch-package) -("qz" quail-japanese-switch-package) - -) +(dolist (elt quail-japanese-transliteration-rules) + (quail-defrule (car elt) (nth 1 elt))) (quail-define-package "japanese-ascii" "Japanese" "Aa" @@ -520,6 +522,12 @@ nil t t nil nil nil nil nil 'quail-japanese-katakana-update-translation) -;; Use the same map as that of `japanese'. -(setcar (cdr (cdr quail-current-package)) - (nth 2 (assoc "japanese" quail-package-alist))) +(dolist (elt quail-japanese-transliteration-rules) + (quail-defrule (car elt) + (let ((trans (nth 1 elt))) + (cond((stringp trans) + (japanese-katakana trans)) + ((vectorp trans) + (vector (japanese-katakana (aref trans 0)))) + (t trans))))) +