annotate leim/quail/sisheng.el @ 104533:b466eba29a01

* dbusbind.c (XD_WITH_DBUS_WATCH_GET_UNIX_FD): Remove. It was intended as hotfix only. (xd_add_watch, xd_remove_watch): Use HAVE_DBUS_WATCH_GET_UNIX_FD.
author Michael Albinus <michael.albinus@gmx.de>
date Sat, 22 Aug 2009 08:56:44 +0000
parents 0d2e4142fb60
children 1d1d5d9bd884
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
55629
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
1 ;;; sisheng.el --- sisheng input method for Chinese pinyin transliteration
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
2
100963
0d2e4142fb60 Add 2009 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 94710
diff changeset
3 ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
55629
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
4
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
5 ;; Author: Werner LEMBERG <wl@gnu.org>
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
6
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
7 ;; Keywords: multilingual, input method, Chinese, pinyin, sisheng
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
8
94710
4f1fd208c354 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79727
diff changeset
9 ;; This file is part of GNU Emacs.
4f1fd208c354 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79727
diff changeset
10
4f1fd208c354 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79727
diff changeset
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
55629
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
94710
4f1fd208c354 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79727
diff changeset
13 ;; the Free Software Foundation, either version 3 of the License, or
4f1fd208c354 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79727
diff changeset
14 ;; (at your option) any later version.
55629
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
15
94710
4f1fd208c354 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79727
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
55629
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
20
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
94710
4f1fd208c354 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79727
diff changeset
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
55629
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
23
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
24 ;;; Commentary:
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
25
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
26 ;;; Code:
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
27
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
28 (require 'quail)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
29
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
30 (defconst sisheng-regexp
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
31 "[āēīōūǖ]\\|üē")
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
32
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
33 ;; First element is the key,
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
34 ;; second element is the vowel used for the input sequence,
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
35 ;; last four elements are the resulting tones.
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
36 ;;
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
37 (defconst sisheng-vowel-table
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
38 '(("ā" "a" "ā" "á" "ǎ" "à")
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
39 ("ē" "e" "ē" "é" "ě" "è")
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
40 ("ī" "i" "ī" "í" "ǐ" "ì")
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
41 ("ō" "o" "ō" "ó" "ǒ" "ò")
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
42 ("ū" "u" "ū" "ú" "ǔ" "ù")
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
43 ("ǖ" "v" "ǖ" "ǘ" "ǚ" "ǜ")
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
44 ("üē" "ve" "üē" "üé" "üě" "üè")))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
45
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
46
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
47 ;; All possible syllables in Mandarin Chinese, presented in the first
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
48 ;; tone. Note that make-sisheng-rules always constructs rules for all
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
49 ;; four tones even if some of those tones aren't used in Mandarin.
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
50 ;;
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
51 (defconst sisheng-syllable-table
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
52 '("ā" "āi" "ān" "āng" "āo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
53
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
54 "bā" "bāi" "bān" "bāng" "bāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
55 "bēi" "bēn" "bēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
56 "bī" "biān" "biāo" "biē" "bīn" "bīng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
57 "bō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
58 "bū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
59
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
60 "cā" "cāi" "cān" "cāng" "cāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
61 "cē" "cēn" "cēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
62 "cī"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
63 "cōng" "cōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
64 "cū" "cuān" "cuī" "cūn" "cuō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
65
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
66 "chā" "chāi" "chān" "chāng" "chāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
67 "chē" "chēn" "chēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
68 "chī"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
69 "chōng" "chōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
70 "chū" "chuā" "chuāi" "chuān" "chuāng" "chuī" "chūn" "chuō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
71
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
72 "dā" "dāi" "dān" "dāng" "dāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
73 "dē" "dēi" "dēn" "dēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
74 "dī" "diān" "diāo" "diē" "dīng" "diū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
75 "dōng" "dōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
76 "dū" "duān" "duī" "dūn" "duō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
77
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
78 "ē" "ēi" "ēn" "ēng" "ēr"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
79
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
80 "fā" "fān" "fāng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
81 "fēi" "fēn" "fēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
82 "fiāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
83 "fō" "fōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
84 "fū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
85
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
86 "gā" "gāi" "gān" "gāng" "gāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
87 "gē" "gēi" "gēn" "gēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
88 "gōng" "gōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
89 "gū" "guā" "guāi" "guān" "guāng" "guī" "gūn" "guō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
90
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
91 "hā" "hāi" "hān" "hāng" "hāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
92 "hē" "hēi" "hēn" "hēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
93 "hōng" "hōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
94 "hū" "huā" "huāi" "huān" "huāng" "huī" "hūn" "huō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
95
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
96 "jī" "jiā" "jiān" "jiāng" "jiāo" "jiē" "jīn" "jīng" "jiōng" "jiū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
97 "jū" "juān" "juē" "jūn"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
98
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
99 "kā" "kāi" "kān" "kāng" "kāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
100 "kē" "kēi" "kēn" "kēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
101 "kōng" "kōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
102 "kū" "kuā" "kuāi" "kuān" "kuāng" "kuī" "kūn" "kuō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
103
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
104 "lā" "lāi" "lān" "lāng" "lāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
105 "lē" "lēi" "lēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
106 "lī" "liā" "liān" "liāng" "liāo" "liē" "līn" "līng" "liū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
107 "lōng" "lōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
108 "lū" "luān" "lūn" "luō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
109 "lǖ" "lüē"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
110
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
111 "mā" "māi" "mān" "māng" "māo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
112 "mē" "mēi" "mēn" "mēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
113 "mī" "miān" "miāo" "miē" "mīn" "mīng" "miū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
114 "mō" "mōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
115 "mū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
116
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
117 "nā" "nāi" "nān" "nāng" "nāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
118 "nē" "nēi" "nēn" "nēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
119 "nī" "niān" "niāng" "niāo" "niē" "nīn" "nīng" "niū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
120 "nōng" "nōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
121 "nū" "nuān" "nuō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
122 "nǖ" "nüē"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
123
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
124 "ō" "ōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
125
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
126 "pā" "pāi" "pān" "pāng" "pāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
127 "pēi" "pēn" "pēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
128 "pī" "piān" "piāo" "piē" "pīn" "pīng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
129 "pō" "pōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
130 "pū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
131
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
132 "qī" "qiā" "qiān" "qiāng" "qiāo" "qiē" "qīn" "qīng" "qiōng" "qiū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
133 "qū" "quān" "quē" "qūn"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
134
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
135 "rān" "rāng" "rāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
136 "rē" "rēn" "rēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
137 "rī"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
138 "rōng" "rōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
139 "rū" "ruā" "ruān" "ruī" "rūn" "ruō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
140
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
141 "sā" "sāi" "sān" "sāng" "sāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
142 "sē" "sēn" "sēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
143 "sī"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
144 "sōng" "sōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
145 "sū" "suān" "suī" "sūn" "suō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
146
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
147 "shā" "shāi" "shān" "shāng" "shāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
148 "shē" "shēi" "shēn" "shēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
149 "shī"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
150 "shōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
151 "shū" "shuā" "shuāi" "shuān" "shuāng" "shuī" "shūn" "shuō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
152
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
153 "tā" "tāi" "tān" "tāng" "tāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
154 "tē" "tēi" "tēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
155 "tī" "tiān" "tiāo" "tiē" "tīng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
156 "tōng" "tōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
157 "tū" "tuān" "tuī" "tūn" "tuō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
158
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
159 "wā" "wāi" "wān" "wāng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
160 "wēi" "wēn" "wēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
161 "wō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
162 "wū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
163
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
164 "xī" "xiā" "xiān" "xiāng" "xiāo" "xiē" "xīn" "xīng" "xiōng" "xiū"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
165 "xū" "xuān" "xuē" "xūn"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
166
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
167 "yā" "yān" "yāng" "yāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
168 "yē"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
169 "yī" "yīn" "yīng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
170 "yō" "yōng" "yōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
171 "yū" "yuān" "yuē" "yūn"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
172
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
173 "zā" "zāi" "zān" "zāng" "zāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
174 "zē" "zēi" "zēn" "zēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
175 "zī"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
176 "zōng" "zōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
177 "zū" "zuān" "zuī" "zūn" "zuō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
178
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
179 "zhā" "zhāi" "zhān" "zhāng" "zhāo"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
180 "zhē" "zhēi" "zhēn" "zhēng"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
181 "zhī"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
182 "zhōng" "zhōu"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
183 "zhū" "zhuā" "zhuāi" "zhuān" "zhuāng" "zhuī" "zhūn" "zhuō"))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
184
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
185 ;; This function converts e.g.
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
186 ;;
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
187 ;; "zhuō"
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
188 ;;
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
189 ;; into
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
190 ;;
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
191 ;; (("zhuo4" ["zhuò"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
192 ;; ("zhuo3" ["zhuǒ"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
193 ;; ("zhuo2" ["zhuó"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
194 ;; ("zhuo1" ["zhuō"]))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
195 ;;
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
196 (defun quail-make-sisheng-rules (syllable)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
197 (let ((case-fold-search t)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
198 vowel-match
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
199 vowel-list
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
200 input-vowel
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
201 base-key
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
202 key
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
203 value
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
204 key-value-list
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
205 (i 1))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
206 (string-match sisheng-regexp syllable)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
207 (setq vowel-match (downcase (match-string 0 syllable)))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
208 (setq vowel-list
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
209 (cdr (assoc-string vowel-match sisheng-vowel-table)))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
210 (setq input-vowel (car vowel-list))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
211 (setq base-key (replace-match input-vowel nil nil syllable))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
212 (while (<= i 4)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
213 (setq key (concat base-key (number-to-string i)))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
214 (setq value (vector (replace-match (nth i vowel-list) nil nil syllable)))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
215 (push (list key value) key-value-list)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
216 (setq i (1+ i)))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
217 key-value-list))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
218
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
219 ;; Set up sisheng input method.
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
220 ;;
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
221 (quail-define-package
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
222 "chinese-sisheng" ; name
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
223 "Chinese" ; language
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
224 "ǚ" ; title
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
225 t ; guidance
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
226 "Sìshēng input method for pīnyīn transliteration of Chinese.
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
227
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
228 Examples: shuang1 -> shuāng
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
229 Lv3 -> Lǚ
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
230 AN4 -> ÀN
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
231
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
232 Use the fifth (unstressed) tone for syllables containing `ü'
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
233 without a tone mark.
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
234
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
235 Example: nve5 -> nüe
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
236 " ; docstring
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
237 nil ; translation-keys
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
238 t ; forget-last-selection
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
239 nil ; deterministic
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
240 nil ; kbd-translate
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
241 nil ; show-layout
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
242 nil ; create-decode-map
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
243 nil ; maximum-shortest
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
244 nil ; overlay-plist
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
245 nil ; update-translation-function
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
246 nil ; conversion-keys
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
247 t ; simple
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
248 )
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
249
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
250 ;; Call quail-make-sisheng-rules for all syllables in sisheng-syllable-table.
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
251 ;;
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
252 (let ((case-table-save (current-case-table))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
253 sisheng-list)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
254 (set-case-table (standard-case-table))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
255 (dolist (syllable sisheng-syllable-table)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
256 (setq sisheng-list
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
257 (append (quail-make-sisheng-rules syllable)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
258 sisheng-list)))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
259
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
260 (dolist (syllable sisheng-syllable-table)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
261 (setq sisheng-list
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
262 (append (quail-make-sisheng-rules (upcase-initials syllable))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
263 sisheng-list)))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
264
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
265 (dolist (syllable sisheng-syllable-table)
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
266 (setq sisheng-list
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
267 (append (quail-make-sisheng-rules (upcase syllable))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
268 sisheng-list)))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
269
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
270 (eval `(quail-define-rules
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
271 ,@sisheng-list
94710
4f1fd208c354 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79727
diff changeset
272
55629
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
273 ("lv5" ["lü"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
274 ("lve5" ["lüe"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
275 ("nv5" ["nü"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
276 ("nve5" ["nüe"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
277
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
278 ("Lv5" ["Lü"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
279 ("Lve5" ["Lüe"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
280 ("Nv5" ["Nü"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
281 ("Nve5" ["Nüe"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
282
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
283 ("LV5" ["LÜ"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
284 ("LVE5" ["LÜE"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
285 ("NV5" ["NÜ"])
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
286 ("NVE5" ["NÜE"])))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
287 (set-case-table case-table-save))
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
288
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
289 ;; Local Variables:
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
290 ;; coding: utf-8
53b5feba7a77 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
291 ;; End:
55631
68f840eae70b Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents: 55629
diff changeset
292
94710
4f1fd208c354 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79727
diff changeset
293 ;; arch-tag: 1fa6ba5f-6747-44bc-bf12-30628ad3e8ad
4f1fd208c354 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79727
diff changeset
294 ;;; sisheng.el ends here