2 |
|
|
3 |
;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. |
;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. |
4 |
;; Licensed to the Free Software Foundation. |
;; Licensed to the Free Software Foundation. |
5 |
|
;; Copyright (C) 2004 |
6 |
|
;; National Institute of Advanced Industrial Science and Technology (AIST) |
7 |
|
;; Registration Number H14PRO021 |
8 |
|
|
9 |
;; Keywords: multilingual, input method, Lao |
;; Keywords: multilingual, input method, Lao |
10 |
|
|
45 |
(compose-string (quail-lookup-map-and-concat quail-current-key)))) |
(compose-string (quail-lookup-map-and-concat quail-current-key)))) |
46 |
control-flag) |
control-flag) |
47 |
|
|
48 |
(defconst lao-key-alist |
(defvar lao-key-alist |
49 |
'(("!" . "1") |
'(("!" . "1") |
50 |
("\"" . "=") |
("\"" . "=") |
51 |
("#" . "3") |
("#" . "3") |
149 |
("\\7" . "(1w(B") |
("\\7" . "(1w(B") |
150 |
("\\8" . "(1x(B") |
("\\8" . "(1x(B") |
151 |
("\\9" . "(1y(B") |
("\\9" . "(1y(B") |
152 |
)) |
) |
153 |
|
"Alist of key sequences vs the corresponding Lao string to input. |
154 |
(defconst lao-consonant-key-alist nil) |
This variable is for the input method \"lao\". |
155 |
(defconst lao-semivowel-key-alist nil) |
If you change the value of this variable while quail/lao is already loaded, |
156 |
(defconst lao-vowel-key-alist nil) |
you need to re-load it to properly re-initialize related alists.") |
157 |
(defconst lao-voweltone-key-alist nil) |
|
158 |
(defconst lao-tone-key-alist nil) |
;; Temporary variable to initialize lao-consonant-key-alist, etc. |
159 |
(defconst lao-other-key-alist nil) |
(defconst lao-key-alist-vector |
160 |
|
(let ((tail lao-key-alist) |
161 |
(let ((tail lao-key-alist) |
consonant-key-alist semivowel-key-alist vowel-key-alist |
162 |
elt phonetic-type) |
voweltone-key-alist tone-key-alist other-key-alist |
163 |
(while tail |
elt phonetic-type) |
164 |
(setq elt (car tail) tail (cdr tail)) |
(while tail |
165 |
(if (stringp (cdr elt)) |
(setq elt (car tail) tail (cdr tail)) |
166 |
(setq phonetic-type (get-char-code-property (aref (cdr elt) 0) |
(if (stringp (cdr elt)) |
167 |
|
(setq phonetic-type (get-char-code-property (aref (cdr elt) 0) |
168 |
|
'phonetic-type)) |
169 |
|
(setq phonetic-type (get-char-code-property (aref (aref (cdr elt) 0) 0) |
170 |
'phonetic-type)) |
'phonetic-type)) |
171 |
(setq phonetic-type (get-char-code-property (aref (aref (cdr elt) 0) 0) |
(aset (cdr elt) 0 (compose-string (aref (cdr elt) 0)))) |
172 |
'phonetic-type)) |
(cond ((eq phonetic-type 'consonant) |
173 |
(aset (cdr elt) 0 (compose-string (aref (cdr elt) 0)))) |
(setq consonant-key-alist (cons elt consonant-key-alist))) |
174 |
(cond ((eq phonetic-type 'consonant) |
((memq phonetic-type '(vowel-upper vowel-lower)) |
175 |
(setq lao-consonant-key-alist (cons elt lao-consonant-key-alist))) |
(if (stringp (cdr elt)) |
176 |
((memq phonetic-type '(vowel-upper vowel-lower)) |
(setq vowel-key-alist (cons elt vowel-key-alist)) |
177 |
(if (stringp (cdr elt)) |
(setq voweltone-key-alist (cons elt voweltone-key-alist)))) |
178 |
(setq lao-vowel-key-alist (cons elt lao-vowel-key-alist)) |
((eq phonetic-type 'tone) |
179 |
(setq lao-voweltone-key-alist |
(setq tone-key-alist (cons elt tone-key-alist))) |
180 |
(cons elt lao-voweltone-key-alist)))) |
((eq phonetic-type 'semivowel-lower) |
181 |
((eq phonetic-type 'tone) |
(setq semivowel-key-alist (cons elt semivowel-key-alist))) |
182 |
(setq lao-tone-key-alist (cons elt lao-tone-key-alist))) |
(t |
183 |
((eq phonetic-type 'semivowel-lower) |
(setq other-key-alist (cons elt other-key-alist))))) |
184 |
(setq lao-semivowel-key-alist (cons elt lao-semivowel-key-alist))) |
(vector consonant-key-alist semivowel-key-alist vowel-key-alist |
185 |
(t |
voweltone-key-alist tone-key-alist other-key-alist))) |
186 |
(setq lao-other-key-alist (cons elt lao-other-key-alist)))))) |
|
187 |
|
(defconst lao-consonant-key-alist (aref lao-key-alist-vector 0)) |
188 |
|
(defconst lao-semivowel-key-alist (aref lao-key-alist-vector 1)) |
189 |
|
(defconst lao-vowel-key-alist (aref lao-key-alist-vector 2)) |
190 |
|
(defconst lao-voweltone-key-alist (aref lao-key-alist-vector 3)) |
191 |
|
(defconst lao-tone-key-alist (aref lao-key-alist-vector 4)) |
192 |
|
(defconst lao-other-key-alist (aref lao-key-alist-vector 5)) |
193 |
|
|
194 |
|
;; Done with it. |
195 |
|
(makunbound 'lao-key-alist-vector) |
196 |
|
|
197 |
(quail-define-package |
(quail-define-package |
198 |
"lao" "Lao" "(1E(B" t |
"lao" "Lao" "(1E(B" t |