aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2000-09-07 02:39:06 +0000
committerKenichi Handa2000-09-07 02:39:06 +0000
commit6b1e079c720d2a02ada0c004be5e6029ef267509 (patch)
tree4c702368f10431cd681fecd7c2f593ed8cef5a5e
parent95109387d74c66fe02402bddb3fb5009b0550919 (diff)
downloademacs-6b1e079c720d2a02ada0c004be5e6029ef267509.tar.gz
emacs-6b1e079c720d2a02ada0c004be5e6029ef267509.zip
(quail-cxterm-package-ext-info):
Format changed, and each element now have extra documentations. (tit-process-header): Delete invalid characters from TIT-PROMPT. Adjusted for the change of quail-cxterm-package-ext-info.
-rw-r--r--lisp/international/titdic-cnv.el145
1 files changed, 122 insertions, 23 deletions
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index 9d4ee62c1de..639756a63a1 100644
--- a/lisp/international/titdic-cnv.el
+++ b/lisp/international/titdic-cnv.el
@@ -65,24 +65,109 @@
65 ("KS" euc-kr "Korean"))) 65 ("KS" euc-kr "Korean")))
66 66
67;; List of package names and the corresponding titles. 67;; List of package names and the corresponding titles.
68(defvar quail-cxterm-package-title-alist 68(defvar quail-cxterm-package-ext-info
69 '(("chinese-4corner" . "$(0(?-F(B") 69 '(("chinese-4corner" "$(0(?-F(B")
70 ("chinese-array30" . "$(0#R#O(B") 70 ("chinese-array30" "$(0#R#O(B")
71 ("chinese-ccdospy" . "$AKuF4(B") 71 ("chinese-ccdospy" "$AKuF4(B")
72 ("chinese-ctlau" . "$AAuTA(B") 72 ("chinese-ctlau" "$AAuTA(B")
73 ("chinese-ctlaub" . "$(0N,Gn(B") 73 ("chinese-ctlaub" "$(0N,Gn(B")
74 ("chinese-ecdict" . "$(05CKH(B") 74 ("chinese-ecdict" "$(05CKH(B")
75 ("chinese-etzy" . "$(06/0D(B") 75 ("chinese-etzy" "$(06/0D(B")
76 ("chinese-punct-b5" . "$(0O:(BB") 76
77 ("chinese-punct" . "$A1j(BG") 77 ("chinese-punct-b5" "$(0O:(BB"
78 ("chinese-py-b5" . "$(03<(BB") 78 "Input method for Chinese punctuations and symbols of Big5
79 ("chinese-py" . "$AF4(BG") 79\(`chinese-big5-1' and `chinese-big5-2').")
80 ("chinese-qj-b5" . "$(0)A(BB") 80
81 ("chinese-qj" . "$AH+(BG") 81 ("chinese-punct" "$A1j(BG"
82 ("chinese-sw" . "$AJWN2(B") 82 "Input method for Chinese punctuations and symbols of GB2312
83 ("chinese-tonepy" . "$A5wF4(B") 83\(`chinese-gb2312').")
84 ("chinese-ziranma" . "$AK+F4(B") 84
85 ("chinese-zozy" . "$(0I\0D(B"))) 85 ("chinese-py-b5" "$(03<(BB"
86 "Pinyin base input method for Chinese Big5 characters
87\(`chinese-big5-1', `chinese-big5-2').
88
89This input method works almost the same way as `chinese-py' (which
90see).
91
92This input method supports only Han characters. The more convenient
93method is `chinese-py-punct-b5' which is the conbination of this
94method and `chinese-punct-b5' and supports both Han characters and
95punctuations/symbols.
96
97For double-width Big5 characters correponding to ASCII, use the input
98method `chinese-qj-b5'.
99
100The input method `chinese-py' and `chinese-tonepy' are also Pinyin
101base, but for the character set GB2312 (`chinese-gb2312').")
102
103 ("chinese-py" "$AF4(BG"
104 "Pinyin base input method for Chinese charset GB2312
105\(`chinese-gb2312').
106
107Pinyin is the standared roman transliteration method for Chinese.
108Pinyin uses a sequence of Latin alphabets for each Chinese character.
109The sequence is made by the combination of the initials (the beginning
110sounds) and finals (the ending sounds).
111
112 initials: b p m f d t n l z c s zh ch sh r j q x g k h
113 finals: a o e i er ai ei oa ou an en ang eng ong i ia iao ie iu ian in
114 iang ing iong u ua uo uai ui uan un uan ueng yu yue yuan yun
115
116 (Note: In the correct Pinyin writing, the sequence \"yu\" in the last
117 four finals should be written by the character u-umlaut `$A(9(B'.)
118
119With this input method, each time you type a key, list of Chinese
120characters corresponding to the accumulated key sequence is shown at
121the echo area. Then you can select one from the list by typing an
122index number or by navigating in the candidate list by C-b, C-f, C-n,
123and C-p.
124
125For instance, to input $ADc(B, you type \"n i C-n 3\". The first \"n i\"
126is a Pinyin, \"C-n\" selects the next group of candidates (each group
127contains at most 10 characters), \"3\" select the third character in
128that block.
129
130This input method supports only Han characters. The more convenient
131method is `chinese-py-punct' which is the conbination of this method
132and `chinese-punct' and supports both Han characters and
133punctuations/symbols.
134
135For double-width GB2312 characters correponding to ASCII, use the
136input method `chinese-qj'.
137
138The correct Pinyin system specifies tones by diacritical marks, but
139this input method doesn't use them, which results in easy (you don't
140have to know exact tones) but verbose (many characters are assigned to
141a same key seuqnece) inputting. You may also want to try the input
142method `chinese-tonepy' with which you must specify tones by digits
143\(1..5).")
144
145 ("chinese-qj-b5" "$(0)A(BB"
146"
147"
148)
149 ("chinese-qj" "$AH+(BG"
150"")
151 ("chinese-sw" "$AJWN2(B"
152"")
153 ("chinese-tonepy" "$A5wF4(B"
154 "Pinyin base input method for Chinese charset GB2312 (`chinese-gb2312').
155
156Pinyin is the standared roman transliteration method for Chinese.
157For the detail of Pinyin system, see the documentation of the input
158method `chinese-py'.
159
160This input method works almost the same way as `chinese-py'. The
161difference is that you must type 1..5 after each Pinyin to specify a
162tone. So, to input $ADc(B, you type \"n i 3 3\", the first \"n i\" is a
163Pinyin, the next \"3\" specifies tone, the last \"3\" selecte the
164third character from the candidate list.
165
166For double-width GB2312 characters correponding to ASCII, use the
167input method `chinese-qj'.")
168
169 ("chinese-ziranma" "$AK+F4(B")
170 ("chinese-zozy" "$(0I\0D(B")))
86 171
87;; Return a value of the key in the current line. 172;; Return a value of the key in the current line.
88(defsubst tit-read-key-value () 173(defsubst tit-read-key-value ()
@@ -178,7 +263,14 @@
178 ((= ch ?P) ; PROMPT 263 ((= ch ?P) ; PROMPT
179 (cond ((looking-at "PROMPT:[ \t]*") 264 (cond ((looking-at "PROMPT:[ \t]*")
180 (goto-char (match-end 0)) 265 (goto-char (match-end 0))
181 (setq tit-prompt (tit-read-key-value))))) 266 (setq tit-prompt (tit-read-key-value))
267 ;; Some TIT dictionaies that are encoded by
268 ;; euc-china contains invalid character at the tail.
269 (let* ((last (aref tit-prompt (1- (length tit-prompt))))
270 (split (split-char last)))
271 (if (or (eq (nth 1 split) 32)
272 (eq (nth 2 split) 32))
273 (setq tit-prompt (substring tit-prompt 0 -1)))))))
182 ((= ch ?B) ; BACKSPACE, BEGINDICTIONARY, 274 ((= ch ?B) ; BACKSPACE, BEGINDICTIONARY,
183 ; BEGINPHRASE 275 ; BEGINPHRASE
184 (cond ((looking-at "BACKSPACE:[ \t]*") 276 (cond ((looking-at "BACKSPACE:[ \t]*")
@@ -210,7 +302,7 @@
210 302
211 (princ "(quail-define-package ") 303 (princ "(quail-define-package ")
212 ;; Args NAME, LANGUAGE, TITLE 304 ;; Args NAME, LANGUAGE, TITLE
213 (let ((title (cdr (assoc package quail-cxterm-package-title-alist)))) 305 (let ((title (nth 1 (assoc package quail-cxterm-package-ext-info))))
214 (princ "\"") 306 (princ "\"")
215 (princ package) 307 (princ package)
216 (princ "\" \"") 308 (princ "\" \"")
@@ -236,9 +328,16 @@
236 (princ " t\n")) 328 (princ " t\n"))
237 329
238 ;; Arg DOCSTRING 330 ;; Arg DOCSTRING
239 (prin1 331 (let ((doc (concat tit-prompt "\n"))
240 (mapconcat 'identity (cons tit-prompt (nreverse tit-comments)) "\n")) 332 (comments (if tit-comments
241 (terpri) 333 (mapconcat 'identity (nreverse tit-comments) "\n")))
334 (doc-ext (nth 2 (assoc package quail-cxterm-package-ext-info))))
335 (if comments
336 (setq doc (concat doc "\n" comments "\n")))
337 (if doc-ext
338 (setq doc (concat doc "\n" doc-ext "\n")))
339 (prin1 doc)
340 (terpri))
242 341
243 ;; Arg KEY-BINDINGS 342 ;; Arg KEY-BINDINGS
244 (princ " '(") 343 (princ " '(")