annotate leim/quail/sisheng.el @ 62389:fbb23c0ada57

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