Mercurial > emacs
annotate lisp/language/tibet-util.el @ 21002:bf4300d62bd1
Remove debugging statements.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 27 Feb 1998 22:20:12 +0000 |
parents | f510736ce3d1 |
children | 708271862495 |
rev | line source |
---|---|
17315
a3ca5e15c82a
Fix the format of the first line.
Kenichi Handa <handa@m17n.org>
parents:
17301
diff
changeset
|
1 ;;; tibet-util.el --- Support for inputting Tibetan characters |
17301 | 2 |
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | |
18377
8b4a66c66dd6
Change copyright notice.
Richard M. Stallman <rms@gnu.org>
parents:
18309
diff
changeset
|
4 ;; Licensed to the Free Software Foundation. |
17301 | 5 |
6 ;; Keywords: multilingual, Tibetan | |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
24 | |
25 ;; Author: Toru TOMABECHI, <Toru.Tomabechi@orient.unil.ch> | |
26 | |
27 ;; Created: Feb. 17. 1997 | |
28 | |
29 ;; History: | |
30 ;; 1997.03.13 Modification in treatment of text properties; | |
31 ;; Support for some special signs and punctuations. | |
32 | |
33 ;;; Code: | |
34 | |
17993
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17776
diff
changeset
|
35 ;;;###autoload |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17776
diff
changeset
|
36 (defun setup-tibetan-environment () |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17776
diff
changeset
|
37 (interactive) |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17776
diff
changeset
|
38 (setup-english-environment) |
20738
f510736ce3d1
In setup-LANGUAGE-environment functions,
Kenichi Handa <handa@m17n.org>
parents:
20107
diff
changeset
|
39 (set-language-environment-coding-systems "Tibetan") |
19366
128582711941
(setup-tibetan-environment): Delete
Kenichi Handa <handa@m17n.org>
parents:
19269
diff
changeset
|
40 (setq default-input-method "tibetan-wylie")) |
17993
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17776
diff
changeset
|
41 |
17301 | 42 ;;; This function makes a transcription string for |
43 ;;; re-composing a character. | |
44 | |
45 ;;;###autoload | |
46 (defun tibetan-tibetan-to-transcription (ch) | |
47 "Return a transcription string of Tibetan character CH" | |
48 (let ((char ch) | |
49 (l (append tibetan-consonant-transcription-alist | |
50 tibetan-vowel-transcription-alist | |
51 tibetan-precomposed-transcription-alist | |
52 tibetan-subjoined-transcription-alist)) | |
53 decomp-l t-char trans str result) | |
54 (if (eq (char-charset char) 'composition) | |
55 (setq decomp-l (decompose-composite-char char 'list nil)) | |
56 (setq decomp-l (cons char nil))) | |
57 (setq str "") | |
58 (while decomp-l | |
59 (setq t-char (char-to-string (car decomp-l))) | |
60 (setq trans (car (rassoc t-char l))) | |
61 (setq str (concat str trans)) | |
62 (setq decomp-l (cdr decomp-l))) | |
63 (setq result str))) | |
64 | |
65 ;;; This function translates transcription string into a string of | |
66 ;;; Tibetan characters. | |
67 | |
68 ;;;###autoload | |
69 (defun tibetan-transcription-to-tibetan (transcription) | |
70 "Translate Roman transcription into a sequence of Tibetan components." | |
71 (let ((trans transcription) | |
72 (lp tibetan-precomposed-transcription-alist) | |
73 (l (append tibetan-consonant-transcription-alist | |
74 tibetan-vowel-transcription-alist | |
75 tibetan-subjoined-transcription-alist)) | |
76 (case-fold-search nil) | |
77 substr t-char p-str t-str result) | |
78 (setq substr "") | |
79 (setq p-str "") | |
80 (setq t-str "") | |
81 (cond ((string-match tibetan-precomposed-regexp trans) | |
82 (setq substr (substring trans (match-beginning 0) (match-end 0))) | |
83 (setq trans (substring trans (match-end 0))) | |
84 (setq t-char (cdr (assoc substr lp))) | |
85 (setq p-str t-char))) | |
86 (while (string-match tibetan-regexp trans) | |
87 (setq substr (substring trans (match-beginning 0) (match-end 0))) | |
88 (setq trans (substring trans 0 (match-beginning 0))) | |
89 (setq t-char | |
90 (cdr (assoc substr l))) | |
91 (setq t-str (concat t-char t-str))) | |
92 (setq result (concat p-str t-str)))) | |
93 | |
94 | |
95 ;;; | |
96 ;;; Functions for composing Tibetan character. | |
97 ;;; | |
98 ;;; A Tibetan syllable is typically structured as follows: | |
99 ;;; | |
100 ;;; [Prefix] C [C+] V [M] [Suffix [Post suffix]] | |
101 ;;; | |
102 ;;; where C's are all vertically stacked, V appears below or above | |
103 ;;; consonant cluster and M is always put above the C[C+]V combination. | |
104 ;;; (Sanskrit visarga, though it is a vowel modifier, is considered | |
105 ;;; to be a punctuation.) | |
106 ;;; | |
107 ;;; Here are examples of the words "bsgrubs" and "h'uM" | |
108 ;;; | |
109 ;;; $(7"72%q`"U1"7"G(B 2$(7"H`#A`"U0"_1(B | |
110 ;;; | |
111 ;;; M | |
112 ;;; b s b s h | |
113 ;;; g ' | |
114 ;;; r u | |
115 ;;; u | |
116 ;;; | |
117 ;;; Consonants ''', 'w', 'y', 'r' take special forms when they are used | |
118 ;;; as subjoined consonant. Consonant 'r' takes another special form | |
119 ;;; when used as superjoined as in "rka", and so on, while it does not | |
120 ;;; change its form when conjoined with subjoined ''', 'w' or 'y' | |
121 ;;; as in "rwa", "rya". | |
122 ;;; | |
123 ;;; | |
124 ;;; As a Tibetan input method should avoid using conversion key, | |
125 ;;; we use a "Tibetan glyph -> transcription -> Tibetan glyph" | |
126 ;;; translation at each key input. | |
127 ;;; | |
128 ;;; 1st stage - Check the preceding char. | |
129 ;;; If the preceding char is Tibetan and composable, then | |
130 ;;; | |
131 ;;; 2nd stage - Translate the preceding char into transcription | |
132 ;;; | |
133 ;;; 3rd stage - Concatenate the transcription of preceding char | |
134 ;;; and the current input key. | |
135 ;;; | |
136 ;;; 4th stage - Re-translate the concatenated transcription into | |
137 ;;; a sequence of Tibetan letters. | |
138 ;;; | |
139 ;;; 5th stage - Convert leading consonants into one single precomposed char | |
140 ;;; if possible. | |
141 ;;; | |
142 ;;; 6th stage - Compose the consonants into one composite glyph. | |
143 ;;; | |
144 ;;; (If the current input is a vowel sign or a vowel modifier, | |
145 ;;; then it is composed with preceding char without checking | |
146 ;;; except when the preceding char is a punctuation or a digit.) | |
147 ;;; | |
148 ;;; | |
149 | |
150 ;;; This function is used to avoid composition | |
151 ;;; between Tibetan and non-Tibetan chars. | |
152 | |
153 ;;;###autoload | |
154 (defun tibetan-char-examin (ch) | |
155 "Check if char CH is Tibetan character. | |
156 Returns non-nil if CH is Tibetan. Otherwise, returns nil." | |
157 (let ((chr ch)) | |
158 (if (eq (char-charset chr) 'composition) | |
159 (string-match "\\cq+" (decompose-composite-char chr)) | |
160 (string-match "\\cq" (char-to-string chr))))) | |
161 | |
162 ;;; This is used to avoid composition between digits, signs, punctuations | |
163 ;;; and word constituents. | |
164 | |
165 ;;;###autoload | |
166 (defun tibetan-composable-examin (ch) | |
167 "Check if Tibetan char CH is composable. | |
168 Returns t if CH is a composable char \(i.e. neither punctuation nor digit)." | |
169 (let ((chr ch) | |
170 chstr) | |
171 (if (eq (char-charset chr) 'composition) | |
172 (setq chstr (decompose-composite-char chr)) | |
173 (setq chstr (char-to-string chr))) | |
174 (not (string-match "[$(7!1(B-$(7!o"f$(8!;!=!?!@!A!D"`(B]" chstr)))) | |
175 | |
176 | |
177 ;;; This checks if a character to be composed contains already | |
178 ;;; one or more vowels / vowel modifiers. If the character contains | |
179 ;;; them, then no more consonant should be added. | |
180 | |
181 ;;;###autoload | |
182 (defun tibetan-complete-char-examin (ch) | |
183 "Check if composite char CH contains one or more vowel/vowel modifiers. | |
184 Returns non-nil, if CH contains vowel/vowel modifiers." | |
185 (let ((chr ch) | |
186 chstr) | |
187 (if (eq (char-charset chr) 'composition) | |
188 (setq chstr (decompose-composite-char chr)) | |
189 (setq chstr (char-to-string chr))) | |
190 (string-match "[$(7!g!e"Q(B-$(7"^"_(B-$(7"l(B]" chstr))) | |
191 | |
192 ;;; This function makes a composite character consisting of two characters | |
193 ;;; vertically stacked. | |
194 | |
195 ;;;###autoload | |
196 (defun tibetan-vertical-stacking (first second upward) | |
197 "Return a vertically stacked composite char consisting of FIRST and SECOND. | |
198 If UPWARD is non-nil, then SECOND is put above FIRST." | |
199 (if upward | |
200 (compose-chars first '(tc . bc) second) | |
201 (compose-chars first '(bc . tc) second))) | |
202 | |
203 ;;; This function makes a composite char from a string. | |
204 ;;; Note that this function returns a string, not a char. | |
205 | |
206 ;;;###autoload | |
207 (defun tibetan-compose-string (str) | |
208 "Compose a sequence of Tibetan character components into a composite character. | |
209 Returns a string containing a composite character." | |
210 (let ((t-str str) | |
211 f-str s-str f-ch s-ch rest composed result) | |
212 ;;Make sure no redundant vowel sign is present. | |
213 (if (string-match | |
214 "^\\(.+\\)\\($(7"Q(B\\)\\([$(7!I!g!e"Q(B-$(7"^"_(B-$(7"l(B]\\)" t-str) | |
215 (setq t-str (concat | |
216 (match-string 1 t-str) | |
217 (match-string 3 t-str)))) | |
218 (if (string-match | |
219 "^\\(.+\\)\\([$(7!I!g!e"Q(B-$(7"^"_(B-$(7"l(B]\\)\\($(7"Q(B\\)" t-str) | |
220 (setq t-str (concat | |
221 (match-string 1 t-str) | |
222 (match-string 2 t-str)))) | |
223 ;;Start conversion. | |
224 (setq result "") | |
225 ;; Consecutive base/precomposed consonants are reduced to the last one. | |
226 (while (string-match "^\\([$(7"!(B-$(7"J$!(B-$(7%u(B]\\)\\([$(7"!(B-$(7"@"B(B-$(7"J$!(B-$(7%u(B].*\\)" t-str) | |
227 (setq result (concat result (match-string 1 t-str))) | |
228 (setq t-str (match-string 2 t-str))) | |
229 ;; Vowel/vowel modifier, subjoined consonants are added one by one | |
230 ;; to the preceding element. | |
231 (while | |
232 (string-match "^\\(.\\)\\([$(7"A#!(B-$(7#J!I!g!e"Q(B-$(7"^"_(B-$(7"l(B]\\)\\(.*\\)" t-str) | |
233 (setq f-str (match-string 1 t-str)) | |
234 (setq f-ch (string-to-char f-str)) | |
235 (setq s-str (match-string 2 t-str)) | |
236 ;;Special treatment for 'a chung. | |
237 ;;If 'a follows a consonant, then turned into its subjoined form. | |
238 (if (and (string-match "$(7"A(B" s-str) | |
239 (not (tibetan-complete-char-examin f-ch))) | |
240 (setq s-str "$(7#A(B")) | |
241 (setq s-ch (string-to-char s-str)) | |
242 (setq rest (match-string 3 t-str)) | |
243 (cond ((string-match "\\c2" s-str);; upper vowel sign | |
244 (setq composed | |
245 (tibetan-vertical-stacking f-ch s-ch t))) | |
246 ((string-match "\\c3" s-str);; lower vowel sign | |
247 (setq composed | |
248 (tibetan-vertical-stacking f-ch s-ch nil))) | |
249 ;;Automatic conversion of ra-mgo (superscribed r). | |
250 ;;'r' is converted if followed by a subjoined consonant | |
251 ;;other than w, ', y, r. | |
252 ((and (string-match "$(7"C(B" f-str) | |
253 (not (string-match "[$(7#>#A#B#C(B]" s-str))) | |
254 (setq f-ch ?$(7#P(B) | |
255 (setq composed | |
256 (tibetan-vertical-stacking f-ch s-ch nil))) | |
257 ((not (tibetan-complete-char-examin f-ch)) | |
258 ;;Initial base consonant is tranformed, if followed by | |
259 ;;a subjoined consonant, except when it is followed | |
260 ;;by a subscribed 'a. | |
261 (if (and (string-match "[$(7"!(B-$(7"="?"@"D(B-$(7"J(B]" f-str) | |
262 (not (string-match "$(7#A(B" s-str))) | |
263 (setq f-ch | |
264 (string-to-char | |
265 (cdr (assoc f-str tibetan-base-to-subjoined-alist))))) | |
266 (setq composed | |
267 (tibetan-vertical-stacking f-ch s-ch nil))) | |
268 (t | |
269 (setq composed s-str) | |
270 (setq result (concat result f-str)))) | |
271 (setq t-str (concat composed rest))) | |
272 (setq result (concat result t-str)))) | |
273 | |
274 ;;; quail <-> conversion interface. | |
275 | |
19553
e63ba5228950
(tibetan-composition): Add autoload cookies.
Kenichi Handa <handa@m17n.org>
parents:
19366
diff
changeset
|
276 ;;;###autoload |
17301 | 277 (defun tibetan-composition (pc key) |
278 "Interface to quail input method. | |
279 Takes two arguments: char PC and string KEY, where PC is the preceding | |
280 character to be composed with current input KEY. | |
281 Returns a string which is the result of composition." | |
282 (let (trans cur-ch t-str result) | |
283 ;; Make a tibetan character corresponding to current input key. | |
284 (setq cur-ch (tibetan-transcription-to-tibetan key)) | |
285 ;; Check if the preceding character is Tibetan and composable. | |
286 (cond ((and (tibetan-char-examin pc) | |
287 (tibetan-composable-examin pc)) | |
288 ;;If Tibetan char corresponding to the current input key exists, | |
289 (cond (cur-ch | |
290 ;; Then, | |
291 ;; Convert the preceding character into transcription, | |
292 ;; and concatenate it with the current input key, | |
293 (setq trans (tibetan-tibetan-to-transcription pc)) | |
294 (setq trans (concat trans key)) | |
295 ;; Concatenated transcription is converted to | |
296 ;; a sequence of Tibetan characters, | |
297 (setq t-str (tibetan-transcription-to-tibetan trans)) | |
298 ;; And it is composed into a composite character. | |
299 (setq result (tibetan-compose-string t-str))) | |
300 ;; Else, | |
301 (t | |
302 ;; Simply concatenate the preceding character and | |
303 ;; the current input key. | |
304 (setq result (char-to-string pc)) | |
305 (setq result (concat result key))))) | |
306 ;; If the preceding char is not Tibetan or not composable, | |
307 (t | |
308 ;; pc = 0 means the point is at the beginning of buffer. | |
309 (if (not (eq pc 0)) | |
310 (setq result (char-to-string pc))) | |
311 (if cur-ch | |
312 (setq result (concat result cur-ch)) | |
313 (setq result (concat result key)))) | |
314 ))) | |
315 | |
316 | |
317 ;;;###autoload | |
318 (defun tibetan-decompose-region (beg end) | |
319 "Decompose Tibetan characters in the region BEG END into their components. | |
320 Components are: base and subjoined consonants, vowel signs, vowel modifiers. | |
321 One column punctuations are converted to their 2 column equivalents." | |
322 (interactive "r") | |
323 (let (ch-str ch-beg ch-end) | |
324 (save-excursion | |
325 (save-restriction | |
326 (narrow-to-region beg end) | |
327 (goto-char (point-min)) | |
328 ;; \\cq = Tibetan character | |
329 (while (re-search-forward "\\cq" nil t) | |
330 (setq ch-str (buffer-substring-no-properties | |
331 (match-beginning 0) (match-end 0))) | |
332 ;; Save the points. Maybe, using save-match-data is preferable. | |
333 ;; But in order not to lose the trace(because the body is too long), | |
334 ;; we save the points in variables. | |
335 (setq ch-beg (match-beginning 0)) | |
336 (setq ch-end (match-end 0)) | |
337 ;; Here starts the decomposition. | |
338 (cond | |
339 ;; 1 column punctuations -> 2 column equivalent | |
340 ((string-match "[$(8!D!;!=!?!@!A"`(B]" ch-str) | |
341 (setq ch-str | |
342 (car (rassoc ch-str tibetan-precomposition-rule-alist)))) | |
343 ;; Decomposition of composite character. | |
344 ((eq (char-charset (string-to-char ch-str)) 'composition) | |
345 ;; Make a string which consists of a sequence of | |
346 ;; components. | |
347 (setq ch-str (decompose-composite-char (string-to-char ch-str))) | |
348 ;; Converts nyi zla into base elements. | |
349 (cond ((string= ch-str "$(7#R#S#S#S(B") | |
350 (setq ch-str "$(7!4!5!5(B")) | |
351 ((string= ch-str "$(7#R#S#S(B") | |
352 (setq ch-str "$(7!4!5(B")) | |
353 ((string= ch-str "$(7#R#S!I(B") | |
354 (setq ch-str "$(7!6(B")) | |
355 ((string= ch-str "$(7#R#S(B") | |
356 (setq ch-str "$(7!4(B"))))) | |
357 ;; If the sequence of components starts with a subjoined consonants, | |
358 (if (string-match "^\\([$(7#!(B-$(7#J(B]\\)\\(.*\\)$" ch-str) | |
359 ;; then the first components is converted to its base form. | |
360 (setq ch-str | |
361 (concat (car (rassoc (match-string 1 ch-str) | |
362 tibetan-base-to-subjoined-alist)) | |
363 (match-string 2 ch-str)))) | |
364 ;; If the sequence of components starts with a precomposed character, | |
365 (if (string-match "^\\([$(7$!(B-$(7%u(B]\\)\\(.*\\)$" ch-str) | |
366 ;; then it is converted into a sequence of components. | |
367 (setq ch-str | |
368 (concat (car (rassoc (match-string 1 ch-str) | |
369 tibetan-precomposition-rule-alist)) | |
370 (match-string 2 ch-str)))) | |
371 ;; Special treatment for superscribed r. | |
372 (if (string-match "^$(7#P(B\\(.*\\)$" ch-str) | |
373 (setq ch-str (concat "$(7"C(B" (match-string 1 ch-str)))) | |
374 ;; Finally, the result of decomposition is inserted, and | |
375 ;; the composite character is deleted. | |
376 (insert-and-inherit ch-str) | |
377 (delete-region ch-beg ch-end)))))) | |
378 | |
379 ;;;###autoload | |
380 (defun tibetan-compose-region (beg end) | |
381 "Make composite chars from Tibetan character components in the region BEG END. | |
382 Two column punctuations are converted to their 1 column equivalents." | |
383 (interactive "r") | |
384 (let (str result) | |
385 (save-excursion | |
386 (save-restriction | |
387 (narrow-to-region beg end) | |
388 (goto-char (point-min)) | |
389 ;; First, sequence of components which has a precomposed equivalent | |
390 ;; is converted. | |
391 (while (re-search-forward | |
392 tibetan-precomposition-rule-regexp nil t) | |
393 (setq str (buffer-substring-no-properties | |
394 (match-beginning 0) (match-end 0))) | |
395 (save-match-data | |
396 (insert-and-inherit | |
397 (cdr (assoc str tibetan-precomposition-rule-alist)))) | |
398 (delete-region (match-beginning 0) (match-end 0))) | |
399 (goto-char (point-min)) | |
400 ;; Then, composable elements are put into a composite character. | |
401 (while (re-search-forward | |
402 "[$(7"!(B-$(7"J$!(B-$(7%u(B]+[$(7#!(B-$(7#J!I!g!e"Q(B-$(7"^"_(B-$(7"l(B]+" | |
403 nil t) | |
404 (setq str (buffer-substring-no-properties | |
405 (match-beginning 0) (match-end 0))) | |
406 (save-match-data | |
407 (setq result (tibetan-compose-string str)) | |
408 (insert-and-inherit result)) | |
409 (delete-region (match-beginning 0) (match-end 0))))))) | |
410 | |
411 ;;; | |
412 ;;; This variable is used to avoid repeated decomposition. | |
413 ;;; | |
414 (setq-default tibetan-decomposed nil) | |
415 | |
416 ;;;###autoload | |
417 (defun tibetan-decompose-buffer () | |
418 "Decomposes Tibetan characters in the buffer into their components. | |
419 See also docstring of the function tibetan-decompose-region." | |
420 (interactive) | |
421 (make-local-variable 'tibetan-decomposed) | |
422 (cond ((not tibetan-decomposed) | |
423 (tibetan-decompose-region (point-min) (point-max)) | |
424 (setq tibetan-decomposed t)))) | |
425 | |
426 ;;;###autoload | |
427 (defun tibetan-compose-buffer () | |
428 "Composes Tibetan character components in the buffer. | |
429 See also docstring of the function tibetan-compose-region." | |
430 (interactive) | |
431 (make-local-variable 'tibetan-decomposed) | |
432 (tibetan-compose-region (point-min) (point-max)) | |
433 (setq tibetan-decomposed nil)) | |
434 | |
435 ;;;###autoload | |
436 (defun tibetan-post-read-conversion (len) | |
437 (save-excursion | |
438 (save-restriction | |
439 (let ((buffer-modified-p (buffer-modified-p))) | |
440 (narrow-to-region (point) (+ (point) len)) | |
441 (tibetan-compose-region (point-min) (point-max)) | |
442 (set-buffer-modified-p buffer-modified-p) | |
20107
4595a463b105
(tibetan-post-read-conversion): Return
Kenichi Handa <handa@m17n.org>
parents:
19553
diff
changeset
|
443 (make-local-variable 'tibetan-decomposed) |
4595a463b105
(tibetan-post-read-conversion): Return
Kenichi Handa <handa@m17n.org>
parents:
19553
diff
changeset
|
444 (setq tibetan-decomposed nil) |
4595a463b105
(tibetan-post-read-conversion): Return
Kenichi Handa <handa@m17n.org>
parents:
19553
diff
changeset
|
445 (- (point-max) (point-min)))))) |
17301 | 446 |
447 | |
448 ;;;###autoload | |
449 (defun tibetan-pre-write-conversion (from to) | |
450 (setq tibetan-decomposed-temp tibetan-decomposed) | |
451 (let ((old-buf (current-buffer)) | |
452 (work-buf (get-buffer-create " *tibetan-work*"))) | |
453 (set-buffer work-buf) | |
454 (erase-buffer) | |
17776
ece62fdeeebb
(tibetan-pre-write-conversion): Make it work
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
455 (if (stringp from) |
ece62fdeeebb
(tibetan-pre-write-conversion): Make it work
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
456 (insert from) |
ece62fdeeebb
(tibetan-pre-write-conversion): Make it work
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
457 (insert-buffer-substring old-buf from to)) |
17301 | 458 (if (not tibetan-decomposed-temp) |
17776
ece62fdeeebb
(tibetan-pre-write-conversion): Make it work
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
459 (tibetan-decompose-region (point-min) (point-max))) |
ece62fdeeebb
(tibetan-pre-write-conversion): Make it work
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
460 ;; Should return nil as annotations. |
ece62fdeeebb
(tibetan-pre-write-conversion): Make it work
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
461 nil)) |
17301 | 462 |
18309
bd8b521f5218
Provide XXX-util instead of
Kenichi Handa <handa@m17n.org>
parents:
17993
diff
changeset
|
463 (provide 'tibet-util) |
17301 | 464 |
465 ;;; language/tibet-util.el ends here. |