| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
(require 'quail) |
|---|
| 34 |
(require 'kkc) |
|---|
| 35 |
|
|---|
| 36 |
(defvar quail-japanese-use-double-n nil |
|---|
| 37 |
"If non-nil, use type \"nn\" to insert $B$s(B.") |
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
(defun quail-japanese-update-translation (control-flag) |
|---|
| 42 |
(if (null control-flag) |
|---|
| 43 |
(setq quail-current-str |
|---|
| 44 |
(if (/= (aref quail-current-key 0) ?q) |
|---|
| 45 |
(or quail-current-str quail-current-key) |
|---|
| 46 |
"")) |
|---|
| 47 |
(if (integerp control-flag) |
|---|
| 48 |
(if (= control-flag 0) |
|---|
| 49 |
(setq quail-current-str (aref quail-current-key 0)) |
|---|
| 50 |
(cond ((= (aref quail-current-key 0) ?n) |
|---|
| 51 |
(setq quail-current-str ?$B$s(B) |
|---|
| 52 |
(if (and quail-japanese-use-double-n |
|---|
| 53 |
(= (aref quail-current-key 1) ?n)) |
|---|
| 54 |
(setq control-flag t))) |
|---|
| 55 |
((= (aref quail-current-key 0) (aref quail-current-key 1)) |
|---|
| 56 |
(setq quail-current-str ?$B$C(B)) |
|---|
| 57 |
(t |
|---|
| 58 |
(setq quail-current-str (aref quail-current-key 0)))) |
|---|
| 59 |
(if (integerp control-flag) |
|---|
| 60 |
(setq unread-command-events |
|---|
| 61 |
(list (aref quail-current-key control-flag))))))) |
|---|
| 62 |
control-flag) |
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
(defun quail-japanese-toggle-kana () |
|---|
| 66 |
(interactive) |
|---|
| 67 |
(setq quail-translating nil) |
|---|
| 68 |
(let ((start (overlay-start quail-conv-overlay)) |
|---|
| 69 |
(end (overlay-end quail-conv-overlay))) |
|---|
| 70 |
(save-excursion |
|---|
| 71 |
(goto-char start) |
|---|
| 72 |
(if (re-search-forward "\\cH" end t) |
|---|
| 73 |
(japanese-katakana-region start end) |
|---|
| 74 |
(japanese-hiragana-region start end))) |
|---|
| 75 |
(setq quail-conversion-str |
|---|
| 76 |
(buffer-substring (overlay-start quail-conv-overlay) |
|---|
| 77 |
(overlay-end quail-conv-overlay))))) |
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
(defun quail-japanese-kanji-kkc () |
|---|
| 82 |
(interactive) |
|---|
| 83 |
(when (= (char-before (overlay-end quail-conv-overlay)) ?n) |
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
(goto-char (1- (overlay-end quail-conv-overlay))) |
|---|
| 87 |
(insert ?$B$s(B) |
|---|
| 88 |
(delete-char 1)) |
|---|
| 89 |
(let* ((from (copy-marker (overlay-start quail-conv-overlay))) |
|---|
| 90 |
(len (- (overlay-end quail-conv-overlay) from))) |
|---|
| 91 |
(quail-delete-overlays) |
|---|
| 92 |
(setq quail-current-str nil) |
|---|
| 93 |
(unwind-protect |
|---|
| 94 |
(let ((result (kkc-region from (+ from len)))) |
|---|
| 95 |
(move-overlay quail-conv-overlay from (point)) |
|---|
| 96 |
(setq quail-conversion-str (buffer-substring from (point))) |
|---|
| 97 |
(if (= (+ from result) (point)) |
|---|
| 98 |
(setq quail-converting nil)) |
|---|
| 99 |
(setq quail-translating nil)) |
|---|
| 100 |
(set-marker from nil)))) |
|---|
| 101 |
|
|---|
| 102 |
(defun quail-japanese-self-insert-and-switch-to-alpha (key idx) |
|---|
| 103 |
(quail-delete-region) |
|---|
| 104 |
(setq unread-command-events (list (aref key (1- idx)))) |
|---|
| 105 |
(quail-japanese-switch-package "q" 1)) |
|---|
| 106 |
|
|---|
| 107 |
(defvar quail-japanese-switch-table |
|---|
| 108 |
'((?z . "japanese-zenkaku") |
|---|
| 109 |
(?k . "japanese-hankaku-kana") |
|---|
| 110 |
(?h . "japanese") |
|---|
| 111 |
(?q . ("japanese-ascii")))) |
|---|
| 112 |
|
|---|
| 113 |
(defvar quail-japanese-package-saved nil) |
|---|
| 114 |
(make-variable-buffer-local 'quail-japanese-package-saved) |
|---|
| 115 |
(put 'quail-japanese-package-saved 'permanent-local t) |
|---|
| 116 |
|
|---|
| 117 |
(defun quail-japanese-switch-package (key idx) |
|---|
| 118 |
(quail-delete-region) |
|---|
| 119 |
(setq quail-current-str nil |
|---|
| 120 |
quail-converting nil |
|---|
| 121 |
quail-conversion-str "") |
|---|
| 122 |
(let ((pkg (cdr (assq (aref key (1- idx)) quail-japanese-switch-table)))) |
|---|
| 123 |
(if (null pkg) |
|---|
| 124 |
(quail-error "No package to be switched") |
|---|
| 125 |
(if (stringp pkg) |
|---|
| 126 |
(activate-input-method pkg) |
|---|
| 127 |
(if (string= (car pkg) current-input-method) |
|---|
| 128 |
(if quail-japanese-package-saved |
|---|
| 129 |
(activate-input-method quail-japanese-package-saved)) |
|---|
| 130 |
(setq quail-japanese-package-saved current-input-method) |
|---|
| 131 |
(activate-input-method (car pkg)))))) |
|---|
| 132 |
(throw 'quail-tag nil)) |
|---|
| 133 |
|
|---|
| 134 |
(defvar quail-japanese-transliteration-rules |
|---|
| 135 |
'(( "a" "$B$"(B") ( "i" "$B$$(B") ( "u" "$B$&(B") ( "e" "$B$((B") ( "o" "$B$*(B") |
|---|
| 136 |
("ka" "$B$+(B") ("ki" "$B$-(B") ("ku" "$B$/(B") ("ke" "$B$1(B") ("ko" "$B$3(B") |
|---|
| 137 |
("sa" "$B$5(B") ("si" "$B$7(B") ("su" "$B$9(B") ("se" "$B$ |
|---|
| 138 |
("ta" "$B$?(B") ("ti" "$B$A(B") ("tu" "$B$D(B") ("te" "$B$F(B") ("to" "$B$H(B") |
|---|
| 139 |
("na" "$B$J(B") ("ni" "$B$K(B") ("nu" "$B$L(B") ("ne" "$B$M(B") ("no" "$B$N(B") |
|---|
| 140 |
("ha" "$B$O(B") ("hi" "$B$R(B") ("hu" "$B$U(B") ("he" "$B$X(B") ("ho" "$B$[(B") |
|---|
| 141 |
("ma" "$B$^(B") ("mi" "$B$_(B") ("mu" "$B$`(B") ("me" "$B$a(B") ("mo" "$B$b(B") |
|---|
| 142 |
("ya" "$B$d(B") ("yu" "$B$f(B") ("yo" "$B$h(B") |
|---|
| 143 |
("ra" "$B$i(B") ("ri" "$B$j(B") ("ru" "$B$k(B") ("re" "$B$l(B") ("ro" "$B$m(B") |
|---|
| 144 |
("la" "$B$i(B") ("li" "$B$j(B") ("lu" "$B$k(B") ("le" "$B$l(B") ("lo" "$B$m(B") |
|---|
| 145 |
("wa" "$B$o(B") ("wi" "$B$p(B") ("wu" "$B$&(B") ("we" "$B$q(B") ("wo" "$B$r(B") |
|---|
| 146 |
("n'" "$B$s(B") |
|---|
| 147 |
("ga" "$B$,(B") ("gi" "$B$.(B") ("gu" "$B$0(B") ("ge" "$B$2(B") ("go" "$B$4(B") |
|---|
| 148 |
("za" "$B$6(B") ("zi" "$B$8(B") ("zu" "$B$:(B") ("ze" "$B$<(B") ("zo" "$B$>(B") |
|---|
| 149 |
("da" "$B$@(B") ("di" "$B$B(B") ("du" "$B$E(B") ("de" "$B$G(B") ("do" "$B$I(B") |
|---|
| 150 |
("ba" "$B$P(B") ("bi" "$B$S(B") ("bu" "$B$V(B") ("be" "$B$Y(B") ("bo" "$B$\(B") |
|---|
| 151 |
("pa" "$B$Q(B") ("pi" "$B$T(B") ("pu" "$B$W(B") ("pe" "$B$Z(B") ("po" "$B$](B") |
|---|
| 152 |
|
|---|
| 153 |
("kya" ["$B$-$c(B"]) ("kyu" ["$B$-$e(B"]) ("kye" ["$B$-$'(B"]) ("kyo" ["$B$-$g(B"]) |
|---|
| 154 |
("sya" ["$B$7$c(B"]) ("syu" ["$B$7$e(B"]) ("sye" ["$B$7$'(B"]) ("syo" ["$B$7$g(B"]) |
|---|
| 155 |
("sha" ["$B$7$c(B"]) ("shu" ["$B$7$e(B"]) ("she" ["$B$7$'(B"]) ("sho" ["$B$7$g(B"]) |
|---|
| 156 |
("cha" ["$B$A$c(B"]) ("chu" ["$B$A$e(B"]) ("che" ["$B$A$'(B"]) ("cho" ["$B$A$g(B"]) |
|---|
| 157 |
("tya" ["$B$A$c(B"]) ("tyu" ["$B$A$e(B"]) ("tye" ["$B$A$'(B"]) ("tyo" ["$B$A$g(B"]) |
|---|
| 158 |
("nya" ["$B$K$c(B"]) ("nyu" ["$B$K$e(B"]) ("nye" ["$B$K$'(B"]) ("nyo" ["$B$K$g(B"]) |
|---|
| 159 |
("hya" ["$B$R$c(B"]) ("hyu" ["$B$R$e(B"]) ("hye" ["$B$R$'(B"]) ("hyo" ["$B$R$g(B"]) |
|---|
| 160 |
("mya" ["$B$_$c(B"]) ("myu" ["$B$_$e(B"]) ("mye" ["$B$_$'(B"]) ("myo" ["$B$_$g(B"]) |
|---|
| 161 |
("rya" ["$B$j$c(B"]) ("ryu" ["$B$j$e(B"]) ("rye" ["$B$j$'(B"]) ("ryo" ["$B$j$g(B"]) |
|---|
| 162 |
("lya" ["$B$j$c(B"]) ("lyu" ["$B$j$e(B"]) ("lye" ["$B$j$'(B"]) ("lyo" ["$B$j$g(B"]) |
|---|
| 163 |
("gya" ["$B$.$c(B"]) ("gyu" ["$B$.$e(B"]) ("gye" ["$B$.$'(B"]) ("gyo" ["$B$.$g(B"]) |
|---|
| 164 |
("zya" ["$B$8$c(B"]) ("zyu" ["$B$8$e(B"]) ("zye" ["$B$8$'(B"]) ("zyo" ["$B$8$g(B"]) |
|---|
| 165 |
("jya" ["$B$8$c(B"]) ("jyu" ["$B$8$e(B"]) ("jye" ["$B$8$'(B"]) ("jyo" ["$B$8$g(B"]) |
|---|
| 166 |
( "ja" ["$B$8$c(B"]) ( "ju" ["$B$8$e(B"]) ( "je" ["$B$8$'(B"]) ( "jo" ["$B$8$g(B"]) |
|---|
| 167 |
("bya" ["$B$S$c(B"]) ("byu" ["$B$S$e(B"]) ("bye" ["$B$S$'(B"]) ("byo" ["$B$S$g(B"]) |
|---|
| 168 |
("pya" ["$B$T$c(B"]) ("pyu" ["$B$T$e(B"]) ("pye" ["$B$T$'(B"]) ("pyo" ["$B$T$g(B"]) |
|---|
| 169 |
|
|---|
| 170 |
("kwa" ["$B$/$n(B"]) ("kwi" ["$B$/$#(B"]) ("kwe" ["$B$/$'(B"]) ("kwo" ["$B$/$)(B"]) |
|---|
| 171 |
("tsa" ["$B$D$!(B"]) ("tsi" ["$B$D$#(B"]) ("tse" ["$B$D$'(B"]) ("tso" ["$B$D$)(B"]) |
|---|
| 172 |
( "fa" ["$B$U$!(B"]) ( "fi" ["$B$U$#(B"]) ( "fe" ["$B$U$'(B"]) ( "fo" ["$B$U$)(B"]) |
|---|
| 173 |
("gwa" ["$B$0$n(B"]) ("gwi" ["$B$0$#(B"]) ("gwe" ["$B$0$'(B"]) ("gwo" ["$B$0$)(B"]) |
|---|
| 174 |
|
|---|
| 175 |
("dyi" ["$B$G$#(B"]) ("dyu" ["$B$I$%(B"]) ("dye" ["$B$G$'(B"]) ("dyo" ["$B$I$)(B"]) |
|---|
| 176 |
("xwi" ["$B$&$#(B"]) ("xwe" ["$B$&$'(B"]) ("xwo" ["$B$&$)(B"]) |
|---|
| 177 |
|
|---|
| 178 |
("shi" "$B$7(B") ("tyi" ["$B$F$#(B"]) ("chi" "$B$A(B") ("tsu" "$B$D(B") ("ji" "$B$8(B") |
|---|
| 179 |
("fu" "$B$U(B") |
|---|
| 180 |
("ye" ["$B$$$'(B"]) |
|---|
| 181 |
|
|---|
| 182 |
("va" ["$B%t$!(B"]) ("vi" ["$B%t$#(B"]) ("vu" "$B%t(B") ("ve" ["$B%t$'(B"]) ("vo" ["$B%t$)(B"]) |
|---|
| 183 |
|
|---|
| 184 |
("xa" "$B$!(B") ("xi" "$B$#(B") ("xu" "$B$%(B") ("xe" "$B$'(B") ("xo" "$B$)(B") |
|---|
| 185 |
("xtu" "$B$C(B") ("xya" "$B$c(B") ("xyu" "$B$e(B") ("xyo" "$B$g(B") ("xwa" "$B$n(B") |
|---|
| 186 |
("xka" "$B%u(B") ("xke" "$B%v(B") |
|---|
| 187 |
|
|---|
| 188 |
("1" "$B#1(B") ("2" "$B#2(B") ("3" "$B#3(B") ("4" "$B#4(B") ("5" "$B#5(B") |
|---|
| 189 |
("6" "$B#6(B") ("7" "$B#7(B") ("8" "$B#8(B") ("9" "$B#9(B") ("0" "$B#0(B") |
|---|
| 190 |
|
|---|
| 191 |
("!" "$B!*(B") ("@" "$B!w(B") ("#" "$B!t(B") ("$" "$B!p(B") ("%" "$B!s(B") |
|---|
| 192 |
("^" "$B!0(B") ("&" "$B!u(B") ("*" "$B!v(B") ("(" "$B!J(B") (")" "$B!K(B") |
|---|
| 193 |
("-" "$B!<(B") ("=" "$B!a(B") ("`" "$B!.(B") ("\\" "$B!o(B") ("|" "$B!C(B") |
|---|
| 194 |
("_" "$B!2(B") ("+" "$B!\(B") ("~" "$B!1(B") ("[" "$B!V(B") ("]" "$B!W(B") |
|---|
| 195 |
("{" "$B!P(B") ("}" "$B!Q(B") (":" "$B!'(B") (";" "$B!((B") ("\"" "$B!I(B") |
|---|
| 196 |
("'" "$B!G(B") ("." "$B!#(B") ("," "$B!"(B") ("<" "$B!c(B") (">" "$B!d(B") |
|---|
| 197 |
("?" "$B!)(B") ("/" "$B!?(B") |
|---|
| 198 |
|
|---|
| 199 |
("z1" "$B!{(B") ("z!" "$B!|(B") |
|---|
| 200 |
("z2" "$B"&(B") ("z@" "$B"'(B") |
|---|
| 201 |
("z3" "$B"$(B") ("z#" "$B"%(B") |
|---|
| 202 |
("z4" "$B""(B") ("z$" "$B"#(B") |
|---|
| 203 |
("z5" "$B!~(B") ("z%" "$B"!(B") |
|---|
| 204 |
("z6" "$B!y(B") ("z^" "$B!z(B") |
|---|
| 205 |
("z7" "$B!}(B") ("z&" "$B!r(B") |
|---|
| 206 |
("z8" "$B!q(B") ("z*" "$B!_(B") |
|---|
| 207 |
("z9" "$B!i(B") ("z(" "$B!Z(B") |
|---|
| 208 |
("z0" "$B!j(B") ("z)" "$B![(B") |
|---|
| 209 |
("z-" "$B!A(B") ("z_" "$B!h(B") |
|---|
| 210 |
("z=" "$B!b(B") ("z+" "$B!^(B") |
|---|
| 211 |
("z\\" "$B!@(B") ("z|" "$B!B(B") |
|---|
| 212 |
("z`" "$B!-(B") ("z~" "$B!/(B") |
|---|
| 213 |
|
|---|
| 214 |
("zq" "$B!T(B") ("zQ" "$B!R(B") |
|---|
| 215 |
("zw" "$B!U(B") ("zW" "$B!S(B") |
|---|
| 216 |
("zr" "$B!9(B") ("zR" "$B!8(B") |
|---|
| 217 |
("zt" "$B!:(B") ("zT" "$B!x(B") |
|---|
| 218 |
("zp" "$B")(B") ("zP" "$B",(B") |
|---|
| 219 |
("z[" "$B!X(B") ("z{" "$B!L(B") |
|---|
| 220 |
("z]" "$B!Y(B") ("z}" "$B!M(B") |
|---|
| 221 |
|
|---|
| 222 |
("zs" "$B!3(B") ("zS" "$B!4(B") |
|---|
| 223 |
("zd" "$B!5(B") ("zD" "$B!6(B") |
|---|
| 224 |
("zf" "$B!7(B") ("zF" "$B"*(B") |
|---|
| 225 |
("zg" "$B!>(B") ("zG" "$B!=(B") |
|---|
| 226 |
("zh" "$B"+(B") |
|---|
| 227 |
("zj" "$B"-(B") |
|---|
| 228 |
("zk" "$B",(B") |
|---|
| 229 |
("zl" "$B"*(B") |
|---|
| 230 |
("z;" "$B!+(B") ("z:" "$B!,(B") |
|---|
| 231 |
("z\'" "$B!F(B") ("z\"" "$B!H(B") |
|---|
| 232 |
|
|---|
| 233 |
("zx" [":-"]) ("zX" [":-)"]) |
|---|
| 234 |
("zc" "$B!;(B") ("zC" "$B!n(B") |
|---|
| 235 |
("zv" "$B"((B") ("zV" "$B!`(B") |
|---|
| 236 |
("zb" "$B!k(B") ("zB" "$B"+(B") |
|---|
| 237 |
("zn" "$B!l(B") ("zN" "$B"-(B") |
|---|
| 238 |
("zm" "$B!m(B") ("zM" "$B".(B") |
|---|
| 239 |
("z," "$B!E(B") ("z<" "$B!e(B") |
|---|
| 240 |
("z." "$B!D(B") ("z>" "$B!f(B") |
|---|
| 241 |
("z/" "$B!&(B") ("z?" "$B!g(B") |
|---|
| 242 |
|
|---|
| 243 |
("\\\\" quail-japanese-self-insert-and-switch-to-alpha) |
|---|
| 244 |
("{{" quail-japanese-self-insert-and-switch-to-alpha) |
|---|
| 245 |
("}}" quail-japanese-self-insert-and-switch-to-alpha) |
|---|
| 246 |
|
|---|
| 247 |
("qq" quail-japanese-switch-package) |
|---|
| 248 |
("qz" quail-japanese-switch-package) |
|---|
| 249 |
)) |
|---|
| 250 |
|
|---|
| 251 |
|
|---|
| 252 |
|
|---|
| 253 |
|
|---|
| 254 |
|
|---|
| 255 |
|
|---|
| 256 |
|
|---|
| 257 |
|
|---|
| 258 |
|
|---|
| 259 |
|
|---|
| 260 |
|
|---|
| 261 |
|
|---|
| 262 |
|
|---|
| 263 |
|
|---|
| 264 |
|
|---|
| 265 |
|
|---|
| 266 |
|
|---|
| 267 |
|
|---|
| 268 |
|
|---|
| 269 |
|
|---|
| 270 |
|
|---|
| 271 |
|
|---|
| 272 |
|
|---|
| 273 |
|
|---|
| 274 |
|
|---|
| 275 |
|
|---|
| 276 |
|
|---|
| 277 |
|
|---|
| 278 |
|
|---|
| 279 |
|
|---|
| 280 |
|
|---|
| 281 |
|
|---|
| 282 |
|
|---|
| 283 |
|
|---|
| 284 |
|
|---|
| 285 |
|
|---|
| 286 |
|
|---|
| 287 |
|
|---|
| 288 |
|
|---|
| 289 |
|
|---|
| 290 |
|
|---|
| 291 |
|
|---|
| 292 |
|
|---|
| 293 |
|
|---|
| 294 |
|
|---|
| 295 |
|
|---|
| 296 |
|
|---|
| 297 |
|
|---|
| 298 |
|
|---|
| 299 |
|
|---|
| 300 |
|
|---|
| 301 |
|
|---|
| 302 |
|
|---|
| 303 |
|
|---|
| 304 |
|
|---|
| 305 |
|
|---|
| 306 |
|
|---|
| 307 |
|
|---|
| 308 |
|
|---|
| 309 |
|
|---|
| 310 |
|
|---|
| 311 |
|
|---|
| 312 |
|
|---|
| 313 |
|
|---|
| 314 |
|
|---|
| 315 |
|
|---|
| 316 |
|
|---|
| 317 |
|
|---|
| 318 |
|
|---|
| 319 |
|
|---|
| 320 |
|
|---|
| 321 |
|
|---|
| 322 |
|
|---|
| 323 |
|
|---|
| 324 |
|
|---|
| 325 |
(quail-define-package |
|---|
| 326 |
"japanese" "Japanese" "A$B$"(B" |
|---|
| 327 |
nil |
|---|
| 328 |
"Japanese input method by Roman transliteration and Kana-Kanji conversion. |
|---|
| 329 |
|
|---|
| 330 |
When you use this input method, text entry proceeds in two stages: |
|---|
| 331 |
Roman-Kana transliteration and Kana-Kanji conversion. When you start |
|---|
| 332 |
to enter text, you are in the first stage, Roman-Kana transliteration. |
|---|
| 333 |
Type SPC to proceed to the next stage, Kana-Kanji conversion. |
|---|
| 334 |
|
|---|
| 335 |
:: Roman-Kana transliteration :: |
|---|
| 336 |
|
|---|
| 337 |
You can input any Hiragana character as a sequence of lower-case |
|---|
| 338 |
letters, Japanese punctuation characters by typing punctuation keys, |
|---|
| 339 |
Japanese symbols by typing `z' followed by another key. See below for |
|---|
| 340 |
a list of all available sequences. The characters you input are |
|---|
| 341 |
underlined. |
|---|
| 342 |
|
|---|
| 343 |
In addition, the following keys provide special effects: |
|---|
| 344 |
|
|---|
| 345 |
K Change Hiragana to Katakana or Katakana to Hiragana. |
|---|
| 346 |
qq Toggle between this input method and the input method `japanese-ascii'. |
|---|
| 347 |
qz Shift to the input method `japanese-zenkaku'. |
|---|
| 348 |
Typing \"qh\" will put you back to this input method. |
|---|
| 349 |
RET Accept the current character sequence. |
|---|
| 350 |
SPC Proceed to the next stage, Kana-Kanji conversion. |
|---|
| 351 |
|
|---|
| 352 |
The input method `japanese-ascii' is used to enter ASCII characters. |
|---|
| 353 |
This is almost the same as turning off the input method. The only |
|---|
| 354 |
difference is that typing `qq' will put you back into the Japanese |
|---|
| 355 |
input method. |
|---|
| 356 |
|
|---|
| 357 |
The input method `japanese-zenkaku' is used to enter full width |
|---|
| 358 |
JISX0208 characters corresponding to typed ASCII characters. |
|---|
| 359 |
|
|---|
| 360 |
List of the all key sequences for Roman-Kana transliteration is shown |
|---|
| 361 |
at the tail. |
|---|
| 362 |
|
|---|
| 363 |
:: Kana-Kanji conversion :: |
|---|
| 364 |
|
|---|
| 365 |
You can convert the current Japanese characters (underlined) to |
|---|
| 366 |
Kana-Kanji mixed text. In this stage, the converted text is divided |
|---|
| 367 |
into two parts, the current phrase (highlighted) and the remaining |
|---|
| 368 |
input (underlined). The following commands can be used on the |
|---|
| 369 |
current phrase. |
|---|
| 370 |
|
|---|
| 371 |
SPC, C-n kkc-next |
|---|
| 372 |
Show the next candidate for the current phrase. |
|---|
| 373 |
If successively typed `kkc-show-conversion-list-count' times, |
|---|
| 374 |
conversion candidates are shown in the echo area. |
|---|
| 375 |
C-p kkc-prev |
|---|
| 376 |
Show the previous candidate for the current phrase. |
|---|
| 377 |
If successively typed `kkc-show-conversion-list-count' times, |
|---|
| 378 |
conversion candidates are shown in the echo area. |
|---|
| 379 |
l kkc-show-conversion-list-or-next-group |
|---|
| 380 |
Show at most 10 candidates for the current phrase in echo area. |
|---|
| 381 |
If typed repeatedly, show the next 10 candidates. |
|---|
| 382 |
L kkc-show-conversion-list-or-prev-group |
|---|
| 383 |
Show at most 10 candidates for the current phrase in echo area. |
|---|
| 384 |
If typed repeatedly, show the previous 10 candidates. |
|---|
| 385 |
0..9 kkc-select-from-list |
|---|
| 386 |
Select a candidate corresponding to the typed number. |
|---|
| 387 |
H kkc-hiragana |
|---|
| 388 |
Convert the current phrase to Hiragana |
|---|
| 389 |
K kkc-katakana |
|---|
| 390 |
Convert the current phrase to Katakana |
|---|
| 391 |
C-o kkc-longer |
|---|
| 392 |
Extend the current phrase; pull in the first character of |
|---|
| 393 |
the remaining input. |
|---|
| 394 |
C-i kkc-shorter |
|---|
| 395 |
Contract the current phrase; drop its last character |
|---|
| 396 |
back into the remaining input. |
|---|
| 397 |
C-f kkc-next-phrase |
|---|
| 398 |
Accept the current phrase. If there remains input, select |
|---|
| 399 |
the first phrase as the current one, and show the first |
|---|
| 400 |
candidate for the conversion. |
|---|
| 401 |
DEL, C-c kkc-cancel |
|---|
| 402 |
Cancel the conversion, shift back to the Roman-Kana |
|---|
| 403 |
transliteration. |
|---|
| 404 |
return kkc-terminate |
|---|
| 405 |
Accept the whole conversion. |
|---|
| 406 |
C-SPC, C-@ kkc-first-char-only |
|---|
| 407 |
Accept the first character of the current conversion, |
|---|
| 408 |
delete the remaining input. |
|---|
| 409 |
C-h kkc-help |
|---|
| 410 |
List these key bindings. |
|---|
| 411 |
" |
|---|
| 412 |
nil t t nil nil nil nil nil |
|---|
| 413 |
'quail-japanese-update-translation |
|---|
| 414 |
'(("K" . quail-japanese-toggle-kana) |
|---|
| 415 |
(" " . quail-japanese-kanji-kkc) |
|---|
| 416 |
("\C-m" . quail-no-conversion) |
|---|
| 417 |
([return] . quail-no-conversion)) |
|---|
| 418 |
) |
|---|
| 419 |
|
|---|
| 420 |
(dolist (elt quail-japanese-transliteration-rules) |
|---|
| 421 |
(quail-defrule (car elt) (nth 1 elt))) |
|---|
| 422 |
|
|---|
| 423 |
(quail-define-package |
|---|
| 424 |
"japanese-ascii" "Japanese" "Aa" |
|---|
| 425 |
nil |
|---|
| 426 |
"Temporary ASCII input mode used within the input method `japanese'. |
|---|
| 427 |
Type \"qq\" to go back to previous input method." |
|---|
| 428 |
nil t t) |
|---|
| 429 |
|
|---|
| 430 |
(quail-define-rules ("qq" quail-japanese-switch-package)) |
|---|
| 431 |
|
|---|
| 432 |
(quail-define-package |
|---|
| 433 |
"japanese-zenkaku" "Japanese" "$B#A(B" |
|---|
| 434 |
nil |
|---|
| 435 |
"Japanese zenkaku alpha numeric character input method. |
|---|
| 436 |
---- Special key bindings ---- |
|---|
| 437 |
qq: toggle between this input method and the input method `japanese-ascii'. |
|---|
| 438 |
qh: shift to the input method `japanese', |
|---|
| 439 |
typing \"qz\" puts you back to this input method. |
|---|
| 440 |
" |
|---|
| 441 |
nil t t) |
|---|
| 442 |
|
|---|
| 443 |
(quail-define-rules |
|---|
| 444 |
|
|---|
| 445 |
(" " "$B!!(B") ("!" "$B!*(B") ("\"" "$B!m(B") ("#" "$B!t(B") |
|---|
| 446 |
("$" "$B!p(B") ("%" "$B!s(B") ("&" "$B!u(B") ("'" "$B!l(B") |
|---|
| 447 |
("(" "$B!J(B") (")" "$B!K(B") ("*" "$B!v(B") ("+" "$B!\(B") |
|---|
| 448 |
("," "$B!$(B") ("-" "$B!](B") ("." "$B!%(B") ("/" "$B!?(B") |
|---|
| 449 |
("0" "$B#0(B") ("1" "$B#1(B") ("2" "$B#2(B") ("3" "$B#3(B") |
|---|
| 450 |
("4" "$B#4(B") ("5" "$B#5(B") ("6" "$B#6(B") ("7" "$B#7(B") |
|---|
| 451 |
("8" "$B#8(B") ("9" "$B#9(B") (":" "$B!'(B") (";" "$B!((B") |
|---|
| 452 |
("<" "$B!c(B") ("=" "$B!a(B") (">" "$B!d(B") ("?" "$B!)(B") |
|---|
| 453 |
("@" "$B!w(B") ("A" "$B#A(B") ("B" "$B#B(B") ("C" "$B#C(B") |
|---|
| 454 |
("D" "$B#D(B") ("E" "$B#E(B") ("F" "$B#F(B") ("G" "$B#G(B") |
|---|
| 455 |
("H" "$B#H(B") ("I" "$B#I(B") ("J" "$B#J(B") ("K" "$B#K(B") |
|---|
| 456 |
("L" "$B#L(B") ("M" "$B#M(B") ("N" "$B#N(B") ("O" "$B#O(B") |
|---|
| 457 |
("P" "$B#P(B") ("Q" "$B#Q(B") ("R" "$B#R(B") ("S" "$B#S(B") |
|---|
| 458 |
("T" "$B#T(B") ("U" "$B#U(B") ("V" "$B#V(B") ("W" "$B#W(B") |
|---|
| 459 |
("X" "$B#X(B") ("Y" "$B#Y(B") ("Z" "$B#Z(B") ("[" "$B!N(B") |
|---|
| 460 |
("\\" "$B!o(B") ("]" "$B!O(B") ("^" "$B!0(B") ("_" "$B!2(B") |
|---|
| 461 |
("`" "$B!F(B") ("a" "$B#a(B") ("b" "$B#b(B") ("c" "$B#c(B") |
|---|
| 462 |
("d" "$B#d(B") ("e" "$B#e(B") ("f" "$B#f(B") ("g" "$B#g(B") |
|---|
| 463 |
("h" "$B#h(B") ("i" "$B#i(B") ("j" "$B#j(B") ("k" "$B#k(B") |
|---|
| 464 |
("l" "$B#l(B") ("m" "$B#m(B") ("n" "$B#n(B") ("o" "$B#o(B") |
|---|
| 465 |
("p" "$B#p(B") ("q" "$B#q(B") ("r" "$B#r(B") ("s" "$B#s(B") |
|---|
| 466 |
("t" "$B#t(B") ("u" "$B#u(B") ("v" "$B#v(B") ("w" "$B#w(B") |
|---|
| 467 |
("x" "$B#x(B") ("y" "$B#y(B") ("z" "$B#z(B") ("{" "$B!P(B") |
|---|
| 468 |
("|" "$B!C(B") ("}" "$B!Q(B") ("~" "$B!A(B") |
|---|
| 469 |
|
|---|
| 470 |
("qq" quail-japanese-switch-package) |
|---|
| 471 |
("qh" quail-japanese-switch-package) |
|---|
| 472 |
) |
|---|
| 473 |
|
|---|
| 474 |
(defun quail-japanese-hankaku-update-translation (control-flag) |
|---|
| 475 |
(setq control-flag |
|---|
| 476 |
(quail-japanese-update-translation control-flag)) |
|---|
| 477 |
(if (or (and (stringp quail-current-str) |
|---|
| 478 |
(> (length quail-current-str) 0)) |
|---|
| 479 |
(integerp quail-current-str)) |
|---|
| 480 |
(setq quail-current-str (japanese-hankaku quail-current-str))) |
|---|
| 481 |
control-flag) |
|---|
| 482 |
|
|---|
| 483 |
(quail-define-package |
|---|
| 484 |
"japanese-hankaku-kana" |
|---|
| 485 |
"Japanese" "(I1(B" |
|---|
| 486 |
nil |
|---|
| 487 |
"Japanese hankaku katakana input method by Roman transliteration. |
|---|
| 488 |
---- Special key bindings ---- |
|---|
| 489 |
qq: toggle between this input method and the input method `japanese-ascii'. |
|---|
| 490 |
" |
|---|
| 491 |
nil t t nil nil nil nil nil |
|---|
| 492 |
'quail-japanese-hankaku-update-translation) |
|---|
| 493 |
|
|---|
| 494 |
(dolist (elt quail-japanese-transliteration-rules) |
|---|
| 495 |
(quail-defrule (car elt) |
|---|
| 496 |
(let ((trans (nth 1 elt))) |
|---|
| 497 |
(when (or (stringp trans) (vectorp trans)) |
|---|
| 498 |
(let ((s (japanese-hankaku (if (stringp trans) |
|---|
| 499 |
trans |
|---|
| 500 |
(aref trans 0))))) |
|---|
| 501 |
|
|---|
| 502 |
|
|---|
| 503 |
|
|---|
| 504 |
|
|---|
| 505 |
|
|---|
| 506 |
|
|---|
| 507 |
|
|---|
| 508 |
(if (and (stringp s) (> (length s) 1)) |
|---|
| 509 |
(setq trans (vector s)) |
|---|
| 510 |
(setq trans s)))) |
|---|
| 511 |
trans))) |
|---|
| 512 |
|
|---|
| 513 |
(quail-define-package |
|---|
| 514 |
"japanese-hiragana" "Japanese" "$B$"(B" |
|---|
| 515 |
nil |
|---|
| 516 |
"Japanese hiragana input method by Roman transliteration." |
|---|
| 517 |
nil t t nil nil nil nil nil |
|---|
| 518 |
'quail-japanese-update-translation) |
|---|
| 519 |
|
|---|
| 520 |
;; Use the same map as that of `japanese'. |
|---|
| 521 |
(setcar (cdr (cdr quail-current-package)) |
|---|
| 522 |
(nth 2 (assoc "japanese" quail-package-alist))) |
|---|
| 523 |
|
|---|
| 524 |
;; Update Quail translation region while converting Hiragana to Katakana. |
|---|
| 525 |
(defun quail-japanese-katakana-update-translation (control-flag) |
|---|
| 526 |
(setq control-flag |
|---|
| 527 |
(quail-japanese-update-translation control-flag)) |
|---|
| 528 |
(if (or (and (stringp quail-current-str) |
|---|
| 529 |
(> (length quail-current-str) 0)) |
|---|
| 530 |
(integerp quail-current-str)) |
|---|
| 531 |
(setq quail-current-str (japanese-katakana quail-current-str))) |
|---|
| 532 |
control-flag) |
|---|
| 533 |
|
|---|
| 534 |
(quail-define-package |
|---|
| 535 |
"japanese-katakana" "Japanese" "$B%"(B" |
|---|
| 536 |
nil |
|---|
| 537 |
"Japanese katakana input method by Roman transliteration." |
|---|
| 538 |
nil t t nil nil nil nil nil |
|---|
| 539 |
'quail-japanese-katakana-update-translation) |
|---|
| 540 |
|
|---|
| 541 |
(dolist (elt quail-japanese-transliteration-rules) |
|---|
| 542 |
(quail-defrule (car elt) |
|---|
| 543 |
(let ((trans (nth 1 elt))) |
|---|
| 544 |
(cond ((stringp trans) |
|---|
| 545 |
(japanese-katakana trans)) |
|---|
| 546 |
((vectorp trans) |
|---|
| 547 |
|
|---|