annotate man/mule/quail.texi @ 92:6a43545367ac r20-0test1

Import from CVS: tag r20-0test1
author cvs
date Mon, 13 Aug 2007 09:11:39 +0200
parents 131b0175ea99
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1 \input texinfo @c -*-texinfo-*-
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
2 @setfilename ../info/quail
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
3 @settitle QUAIL -- Imputting methods of multilingual text
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
4
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
5 @titlepage
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
6 @sp 6
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
7 @center @titlefont{QUAIL -- Imputting methods of multilingual text}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
8 @sp 4
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
9 @center Version 2.0
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
10 @sp 5
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
11 @center Ken'ichi HANDA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
12 @center handa@@etl.go.jp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
13 @page
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
14
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
15 @end titlepage
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
16
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
17 @node Top, , , (mule)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
18 @section QUAIL -- Imputting methods of multilingual text
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
19
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
20 Quail is a simple key-translation system which allows users
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
21 to input any multilingual text from normal ASCII keyboard.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
22
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
23 We provide several quail-packages, each package corresponds
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
24 to one inputting methods. For instance, the file
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
25 lisp/quail/py.el provides a package for inputting Chinese by
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
26 PinYin. lisp/quail/hangul.el provides a package for
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
27 inputting Korean.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
28
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
29 @menu
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
30 * Usage of Quail::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
31 * Structure of Quail:: For quail package writers.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
32 @end menu
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
33
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
34 @node Usage of Quail, Structure of Quail, , Top
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
35 @section Usage of Quail
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
36
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
37 You can load several packages at once but only the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
38 translation rules defined in the current package are
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
39 effective. Quail-mode is toggled by C-]. When you enter in
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
40 quail-mode, the current package is shown at the left of modeline as:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
41 @quotation
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
42 @code{[xxxxx]}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
43 @end quotation
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
44 where xxxxx is the multilingual text for the current
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
45 package. In quail-mode, M-s changes the current package
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
46 (normal completion is performed by hitting <SPC> or <TAB>).
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
47
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
48 In quail-mode, all graphic keys you type is translated
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
49 according to the rules of the current package. Brief
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
50 description about the rules and key-bindings are shown by
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
51 M-z.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
52
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
53 While there are more than one candidates for what you type,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
54 the first candidate is shown in buffer with underscore. By
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
55 M-n and M-p you can select any other candidate. M-i shows
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
56 list of candidates (showing each candidate with index number
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
57 [two digits]). You can select one also by typing these
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
58 digits.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
59
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
60 Once you select a desired candidate, please just type a key
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
61 for another character. The underscore moves to the next key
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
62 automatically. But, in some packages (e.g. hangul),
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
63 there are rules something like:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
64 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
65 ab -> A
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
66 aba -> B
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
67 b -> C
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
68 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
69
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
70 In this case, if you type "abab", quail will enter "AA". If
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
71 what you want is "BC", you must explicitly tell the division
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
72 point of the character by hitting <SPC>. In this example,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
73 you should have typed "aba<SPC>b".
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
74
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
75 Here's the summary of command keys:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
76 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
77 ------------------------------------------------------------
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
78 C-]: Exit from quail-mode.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
79 DEL: Delete characters backward in quail-mode.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
80 M-i: Show list of candidates.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
81 M-n: Select next candidate.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
82 M-p: Select previous candidate.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
83 M-s: Select quail-package.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
84 M-z: Show brief description of the current quail-pacakge.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
85 ------------------------------------------------------------
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
86 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
87
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
88 @node Structure of Quail, , Usage of Quail, Top
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
89 @section Structure of Quail
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
90
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
91 #### NOT COMPLETED, NOT UPDATED ####
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
92
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
93 This section is intended to help emacslisper who try to
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
94 debug or enhance 'quail' system. The original code quail.el
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
95 is located under the directory mule/lisp/quail.el.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
96
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
97 Quail serves as a front end processor for inputing
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
98 multilingual text from normal ASCII keyboard. By defining a
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
99 translation table which maps ASCII string to multilingual
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
100 string, you can input any text from ASCII keyboard.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
101
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
102 For the momemnt, translation table for Chinese inputing
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
103 distributed with X.V11R5/contrib/cxterm are supported in
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
104 mule/lisp/quail/XXXX.el files. You can use the system also
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
105 for inputing various Korean/European characters.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
106
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
107 Quail system registers translation table in keymap of Emacs,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
108 thus table lookup is done just by calling function
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
109 @code{lookup-key}, and new registration is done just by calling
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
110 function 'define-key'. Keymap is represented as a
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
111 structured association list. For instance, a translation
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
112 table of the form ("a" -> "A" or "a", "ab" -> "AB", "c" ->
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
113 "C") is represented as follows:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
114
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
115 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
116 (keymap . ((?a . (keymap . ((?\377 . '(0 "A" "a")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
117 (?b . (keymap . ((?\377 . '(0 "AB")))))))))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
118 (?c . (keymap . ((?\377 . '(0 "C")))))))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
119 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
120
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
121 As you see, the final string of translation is registered
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
122 under the tag of ?\377. Hence, the following program
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
123 creates the map above.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
124
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
125 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
126 (setq m (make-sparce-keymap))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
127 (define-key m "a\377" '(0 "A" "a") t)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
128 (define-key m "ab\377" '(0 "AB") t)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
129 (define-key m "c\377" '(0 "C") t)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
130 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
131
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
132 Each '0' means that the first candidate in the list is
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
133 selected at first. In this case, according to your typing,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
134 buffer contents changes as follows:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
135
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
136 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
137 Type: a M-n b c a b
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
138 Buffer: A a AB ABc ABca ABcab
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
139 Uline: - - -- - -
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
140 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
141
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
142 where Uline shows which characters are displayed with
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
143 underline. While underline is shown, we say that quail is
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
144 in 'translation state'. We assumed that M-n is bound to
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
145 @code{quail-next-candidate}.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
146
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
147 The last argument of @code{define-key} 't' means that meta
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
148 characters in the key-string are processed as is (not as ESC
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
149 + char), which is a Mule specific facility. Since keymaps
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
150 can be nested, you can share one keymap (say m) with two
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
151 other keymaps (say m1 and m2) by:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
152
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
153 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
154 (define-key m1 "x" m)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
155 (define-key m2 "y" m)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
156 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
157
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
158 This means the translation ("xa" -> "A" or "a", "xab" ->
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
159 "AB", "xac" -> "C") in map m1 and ("ya" -> "A" or "a", "yab"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
160 -> "AB", "yac" -> "C") in m2.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
161
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
162 We call a keymap which satisfies the description above as a
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
163 'quail-map' here after. Quail handles a quail-map with
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
164 additional information as a 'quail-package'. Each
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
165 quail-package holds the following information as a list:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
166
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
167 @enumerate
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
168 @item
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
169 name (string [ASCII only]): Name of the package.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
170
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
171 @item
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
172 prompt (string [any characters]):
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
173 A string shown in mode-line as a name of quail mode.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
174
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
175 @item
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
176 quail-map: A quail map described above.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
177
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
178 @item
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
179 showkey (alist):
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
180 An alist of character typed and corresponding string to be shown in echo
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
181 area. For instance, quail-package namede "ccdospy" has the following
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
182 showkey:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
183
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
184 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
185 '((?a . "zh") (?f . "en") (?g ."eng") (?h . "ang") (?i . "ch") (?j . "an")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
186 (?k . "ao") (?l . "ai") (?s . "ong") (?u . "sh") (?y . "ing") (?v . "yu"))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
187 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
188
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
189 This says that if you type 'a', "zh" is shown in echo area.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
190 If 'f' is followed by 'a', "zhen" is shown.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
191
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
192 @item
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
193 document (string): A document shown by quail-help command.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
194
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
195 @item
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
196 mode-map (keymap):
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
197 A keymap to control quail mode. This defaults to
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
198 @code{quail-mode-default-map}. Prefix character is restricted to ESC only,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
199 which means you can not define such key sequence as "\C-xi" in this map.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
200 In addition, defining '!' through '~' are no use because those keys are
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
201 overridden by @code{quail-self-insert-command}.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
202
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
203 @item
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
204 nolearn (flag):
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
205 A flag to control learning facility of quail. If this flag is non-nil,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
206 quail does not remeber the last selection of candidate string for the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
207 later selection.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
208
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
209 @item
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
210 deterministic (flag):
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
211 A flag to specify that only one target string is defined in the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
212 quail-map for each key sequence (i.e. no alternative candidates). If
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
213 this flag is non-nil, quail automatically exit from the translation
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
214 state when a target string for a key sequence is found.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
215 @end enumerate
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
216
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
217 All packages defined are in @code{quail-package-alist} (see
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
218 document of quail-define-package).
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
219
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
220 Users are recommended not to modify quail-map directly but
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
221 to use quail-defrule function (see document of quail-defrule).
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
222
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
223 You may find the example of defining quail package and
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
224 defining translation rule of the package in
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
225 lisp/quail/latin.el
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
226
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
227 Quail system works as one of a minor mode so that it works
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
228 under any major modes. But, the way of handling non-quail
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
229 commands are very different from that of the other minor
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
230 modes. All keys typed are eaten by the system because, in
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
231 quail mode, keys except for invoking quail specific commands
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
232 are bound to 'quail-non-quail-command. The function, at
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
233 first, resets quail translation status (we'll explain it
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
234 below), then, checks the original binding of the key in
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
235 local map or global map and invokes the command bound to the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
236 key.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
237
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
238 Quail keeps the current state of transformation with the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
239 following variables:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
240
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
241 @itemize
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
242 @item @code{quail-overlay}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
243
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
244 Keep points of start and end of a string inserted by
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
245 the system. The string is one of below.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
246
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
247 @item @code{quail-current-key}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
248
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
249 A key string typed so far for the current translation.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
250 When there's no translation for the key, this string
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
251 is inserted in a buffer temporally.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
252
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
253 @item @code{quail-current-str}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
254
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
255 A string translated from @code{quail-current-key}. In addition,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
256 attribute region is set automatically around the sting inserted in a
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
257 buffer.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
258 @end itemize
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
259
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
260 @contents
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
261 @bye