Mercurial > emacs
annotate lisp/language/tibet-util.el @ 29365:4073bda08c64
*** empty log message ***
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 01 Jun 2000 11:06:38 +0000 |
parents | 1ebd8db9c3dc |
children | c3845ffcb423 |
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. | |
26896 | 32 ;; 1999.10.25 Modification for a new composition way by K.Handa. |
17301 | 33 |
34 ;;; Code: | |
35 | |
17993
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17776
diff
changeset
|
36 ;;;###autoload |
26896 | 37 (defun tibetan-char-p (ch) |
38 "Check if char CH is Tibetan character. | |
39 Returns non-nil if CH is Tibetan. Otherwise, returns nil." | |
40 (memq (char-charset ch) '(tibetan tibetan-1-column))) | |
41 | |
42 ;;; Functions for Tibetan <-> Tibetan-transcription. | |
17301 | 43 |
44 ;;;###autoload | |
26896 | 45 (defun tibetan-tibetan-to-transcription (str) |
46 "Transcribe Tibetan string STR and return the corresponding Roman string." | |
47 (let (;; Accumulate transcriptions here in reverse order. | |
48 (trans nil) | |
49 (len (length str)) | |
50 (i 0) | |
51 ch this-trans) | |
52 (while (< i len) | |
53 (let ((idx (string-match tibetan-precomposition-rule-alist str i))) | |
54 (if (eq idx i) | |
55 ;; Ith character and the followings matches precomposable | |
56 ;; Tibetan sequence. | |
57 (setq i (match-end 0) | |
58 this-trans | |
59 (car (rassoc | |
60 (cdr (assoc (match-string 0 str) | |
61 tibetan-precomposition-rule-alist)) | |
62 tibetan-precomposed-transcription-alist))) | |
63 (setq ch (substring str i (1+ i)) | |
64 i (1+ i) | |
65 this-trans | |
66 (car (or (rassoc ch tibetan-consonant-transcription-alist) | |
67 (rassoc ch tibetan-vowel-transcription-alist) | |
68 (rassoc ch tibetan-subjoined-transcription-alist))))) | |
69 (setq trans (cons this-trans trans)))) | |
70 (apply 'concat (nreverse trans)))) | |
17301 | 71 |
72 ;;;###autoload | |
26896 | 73 (defun tibetan-transcription-to-tibetan (str) |
74 "Convert Tibetan Roman string STR to Tibetan character string. | |
75 The returned string has no composition information." | |
76 (let (;; Case is significant. | |
17301 | 77 (case-fold-search nil) |
26896 | 78 (idx 0) |
79 ;; Accumulate Tibetan strings here in reverse order. | |
80 (t-str-list nil) | |
81 i subtrans) | |
82 (while (setq i (string-match tibetan-regexp str idx)) | |
83 (if (< idx i) | |
84 ;; STR contains a pattern that doesn't match Tibetan | |
85 ;; transcription. Include the pattern as is. | |
86 (setq t-str-list (cons (substring str idx i) t-str-list))) | |
87 (setq subtrans (match-string 0 str) | |
88 idx (match-end 0)) | |
89 (let ((t-char (cdr (assoc subtrans | |
90 tibetan-precomposed-transcription-alist)))) | |
91 (if t-char | |
92 ;; SUBTRANS corresponds to a transcription for | |
93 ;; precomposable Tibetan sequence. | |
94 (setq t-char (car (rassoc t-char | |
95 tibetan-precomposition-rule-alist))) | |
96 (setq t-char | |
97 (cdr | |
98 (or (assoc subtrans tibetan-consonant-transcription-alist) | |
99 (assoc subtrans tibetan-vowel-transcription-alist) | |
100 (assoc subtrans tibetan-modifier-transcription-alist) | |
101 (assoc subtrans tibetan-subjoined-transcription-alist))))) | |
102 (setq t-str-list (cons t-char t-str-list)))) | |
103 (if (< idx (length str)) | |
104 (setq t-str-list (cons (substring str idx) t-str-list))) | |
105 (apply 'concat (nreverse t-str-list)))) | |
17301 | 106 |
107 ;;; | |
26896 | 108 ;;; Functions for composing/decomposing Tibetan sequence. |
17301 | 109 ;;; |
110 ;;; A Tibetan syllable is typically structured as follows: | |
111 ;;; | |
112 ;;; [Prefix] C [C+] V [M] [Suffix [Post suffix]] | |
113 ;;; | |
114 ;;; where C's are all vertically stacked, V appears below or above | |
115 ;;; consonant cluster and M is always put above the C[C+]V combination. | |
116 ;;; (Sanskrit visarga, though it is a vowel modifier, is considered | |
117 ;;; to be a punctuation.) | |
118 ;;; | |
119 ;;; Here are examples of the words "bsgrubs" and "h'uM" | |
120 ;;; | |
29363
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
121 ;;; 4$(7"70"714%qx!"U0"G###C"U14"70"714"G0"G1(B 4$(7"Hx!"Rx!"Ur'"_0"H"A"U"_1(B |
17301 | 122 ;;; |
123 ;;; M | |
124 ;;; b s b s h | |
125 ;;; g ' | |
126 ;;; r u | |
127 ;;; u | |
128 ;;; | |
26896 | 129 ;;; Consonants `'' ($(7"A(B), `w' ($(7">(B), `y' ($(7"B(B), `r' ($(7"C(B) take special |
130 ;;; forms when they are used as subjoined consonant. Consonant `r' | |
131 ;;; takes another special form when used as superjoined in such a case | |
132 ;;; as "rka", while it does not change its form when conjoined with | |
133 ;;; subjoined `'', `w' or `y' as in "rwa", "rya". | |
134 | |
135 ;; Append a proper composition rule and glyph to COMPONENTS to compose | |
136 ;; CHAR with a composition that has COMPONENTS. | |
17301 | 137 |
26896 | 138 (defun tibetan-add-components (components char) |
139 (let ((last (last components)) | |
140 (stack-upper '(tc . bc)) | |
141 (stack-under '(bc . tc)) | |
142 rule) | |
143 ;; Special treatment for 'a chung. | |
144 ;; If 'a follows a consonant, turn it into the subjoined form. | |
145 (if (and (= char ?$(7"A(B) | |
146 (aref (char-category-set (car last)) ?0)) | |
29363
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
147 (setq char ?$(7"R(B)) ;; modified for new font by Tomabechi 1999/12/10 |
17301 | 148 |
26896 | 149 (cond |
150 ;; Compose upper vowel sign vertically over. | |
151 ((aref (char-category-set char) ?2) | |
152 (setq rule stack-upper)) | |
17301 | 153 |
26896 | 154 ;; Compose lower vowel sign vertically under. |
155 ((aref (char-category-set char) ?3) | |
29363
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
156 (if (eq char ?$(7"Q(B) ;; `$(7"Q(B' should not visible when composed. |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
157 (setq rule nil) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
158 (setq rule stack-under))) |
17301 | 159 |
26896 | 160 ;; Transform ra-mgo (superscribed r) if followed by a subjoined |
161 ;; consonant other than w, ', y, r. | |
162 ((and (= (car last) ?$(7"C(B) | |
29363
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
163 (not (memq char '(?$(7#>(B ?$(7"R(B ?$(7#B(B ?$(7#C(B)))) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
164 (setcar last ?$(7!"(B) ;; modified for newfont by Tomabechi 1999/12/10 |
26896 | 165 (setq rule stack-under)) |
17301 | 166 |
26896 | 167 ;; Transform initial base consonant if followed by a subjoined |
168 ;; consonant but 'a. | |
169 (t | |
170 (let ((laststr (char-to-string (car last)))) | |
29363
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
171 (if (and (/= char ?$(7"R(B) ;; modified for new font by Tomabechi |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
172 (string-match "[$(7"!(B-$(7"="?"@"D(B-$(7"J"K(B]" laststr)) |
26896 | 173 (setcar last (string-to-char |
174 (cdr (assoc (char-to-string (car last)) | |
175 tibetan-base-to-subjoined-alist))))) | |
176 (setq rule stack-under)))) | |
17301 | 177 |
29363
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
178 (if rule |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
179 (setcdr last (list rule char))))) |
17301 | 180 |
181 ;;;###autoload | |
182 (defun tibetan-compose-string (str) | |
26896 | 183 "Compose Tibetan string STR." |
184 (let ((idx 0)) | |
185 ;; `$(7"A(B' is included in the pattern for subjoined consonants | |
186 ;; because we treat it specially in tibetan-add-components. | |
187 (while (setq idx (string-match tibetan-composable-pattern str idx)) | |
188 (let ((from idx) | |
189 (to (match-end 0)) | |
190 components) | |
191 (if (eq (string-match tibetan-precomposition-rule-regexp str idx) idx) | |
192 (setq idx (match-end 0) | |
193 components | |
194 (list (string-to-char | |
195 (cdr | |
196 (assoc (match-string 0 str) | |
197 tibetan-precomposition-rule-alist))))) | |
198 (setq components (list (aref str idx)) | |
199 idx (1+ idx))) | |
200 (while (< idx to) | |
201 (tibetan-add-components components (aref str idx)) | |
202 (setq idx (1+ idx))) | |
203 (compose-string str from to components)))) | |
204 str) | |
17301 | 205 |
19553
e63ba5228950
(tibetan-composition): Add autoload cookies.
Kenichi Handa <handa@m17n.org>
parents:
19366
diff
changeset
|
206 ;;;###autoload |
26896 | 207 (defun tibetan-compose-region (beg end) |
208 "Compose Tibetan text the region BEG and END." | |
17301 | 209 (interactive "r") |
26896 | 210 (let (str result chars) |
17301 | 211 (save-excursion |
212 (save-restriction | |
213 (narrow-to-region beg end) | |
214 (goto-char (point-min)) | |
26896 | 215 ;; `$(7"A(B' is included in the pattern for subjoined consonants |
216 ;; because we treat it specially in tibetan-add-components. | |
217 (while (re-search-forward tibetan-composable-pattern nil t) | |
218 (let ((from (match-beginning 0)) | |
219 (to (match-end 0)) | |
220 components) | |
221 (goto-char from) | |
222 (if (looking-at tibetan-precomposition-rule-regexp) | |
223 (progn | |
224 (setq components | |
225 (list (string-to-char | |
226 (cdr | |
227 (assoc (match-string 0) | |
228 tibetan-precomposition-rule-alist))))) | |
229 (goto-char (match-end 0))) | |
230 (setq components (list (char-after from))) | |
231 (forward-char 1)) | |
232 (while (< (point) to) | |
233 (tibetan-add-components components (following-char)) | |
234 (forward-char 1)) | |
235 (compose-region from to components))))))) | |
17301 | 236 |
29363
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
237 (defvar tibetan-decompose-precomposition-alist |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
238 (mapcar (function (lambda (x) (cons (string-to-char (cdr x)) (car x)))) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
239 tibetan-precomposition-rule-alist)) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
240 |
17301 | 241 ;;;###autoload |
29363
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
242 (defun tibetan-decompose-region (from to) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
243 "Decompose Tibetan text in the region FROM and TO. |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
244 This is different from decompose-region because precomposed Tibetan characters |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
245 are decomposed into normal Tiebtan character sequences." |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
246 (interactive "r") |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
247 (save-restriction |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
248 (narrow-to-region from to) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
249 (decompose-region from to) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
250 (goto-char from) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
251 (while (not (eobp)) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
252 (let* ((char (following-char)) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
253 (slot (assq char tibetan-decompose-precomposition-alist))) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
254 (if slot |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
255 (progn |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
256 (delete-char 1) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
257 (insert (cdr slot))) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
258 (forward-char 1)))))) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
259 |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
260 |
26896 | 261 ;;;###autoload |
29363
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
262 (defun tibetan-decompose-string (str) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
263 "Decompose Tibetan string STR. |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
264 This is different from decompose-string because precomposed Tibetan characters |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
265 are decomposed into normal Tiebtan character sequences." |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
266 (let ((new "") |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
267 (len (length str)) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
268 (idx 0) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
269 char slot) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
270 (while (< idx len) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
271 (setq char (aref str idx) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
272 slot (assq (aref str idx) tibetan-decompose-precomposition-alist) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
273 new (concat new (if slot (cdr slot) (char-to-string char))) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
274 idx (1+ idx))) |
1ebd8db9c3dc
(tibetan-add-components): Fixes for new
Kenichi Handa <handa@m17n.org>
parents:
28906
diff
changeset
|
275 new)) |
26896 | 276 |
277 ;;;###autoload | |
278 (defun tibetan-composition-function (from to pattern &optional string) | |
279 (if string | |
280 (tibetan-compose-string string) | |
281 (tibetan-compose-region from to)) | |
282 (- to from)) | |
17301 | 283 |
284 ;;; | |
285 ;;; This variable is used to avoid repeated decomposition. | |
286 ;;; | |
287 (setq-default tibetan-decomposed nil) | |
288 | |
289 ;;;###autoload | |
290 (defun tibetan-decompose-buffer () | |
291 "Decomposes Tibetan characters in the buffer into their components. | |
26896 | 292 See also the documentation of the function `tibetan-decompose-region'." |
17301 | 293 (interactive) |
294 (make-local-variable 'tibetan-decomposed) | |
295 (cond ((not tibetan-decomposed) | |
296 (tibetan-decompose-region (point-min) (point-max)) | |
297 (setq tibetan-decomposed t)))) | |
298 | |
299 ;;;###autoload | |
300 (defun tibetan-compose-buffer () | |
301 "Composes Tibetan character components in the buffer. | |
302 See also docstring of the function tibetan-compose-region." | |
303 (interactive) | |
304 (make-local-variable 'tibetan-decomposed) | |
305 (tibetan-compose-region (point-min) (point-max)) | |
306 (setq tibetan-decomposed nil)) | |
307 | |
308 ;;;###autoload | |
309 (defun tibetan-post-read-conversion (len) | |
310 (save-excursion | |
311 (save-restriction | |
312 (let ((buffer-modified-p (buffer-modified-p))) | |
313 (narrow-to-region (point) (+ (point) len)) | |
314 (tibetan-compose-region (point-min) (point-max)) | |
315 (set-buffer-modified-p buffer-modified-p) | |
20107
4595a463b105
(tibetan-post-read-conversion): Return
Kenichi Handa <handa@m17n.org>
parents:
19553
diff
changeset
|
316 (make-local-variable 'tibetan-decomposed) |
4595a463b105
(tibetan-post-read-conversion): Return
Kenichi Handa <handa@m17n.org>
parents:
19553
diff
changeset
|
317 (setq tibetan-decomposed nil) |
4595a463b105
(tibetan-post-read-conversion): Return
Kenichi Handa <handa@m17n.org>
parents:
19553
diff
changeset
|
318 (- (point-max) (point-min)))))) |
17301 | 319 |
320 | |
321 ;;;###autoload | |
322 (defun tibetan-pre-write-conversion (from to) | |
323 (setq tibetan-decomposed-temp tibetan-decomposed) | |
23522
0f86fe9632e0
(tibetan-pre-write-conversion): Use with-temp-buffer.
Kenichi Handa <handa@m17n.org>
parents:
22987
diff
changeset
|
324 (let ((old-buf (current-buffer))) |
23545
0d25c6f765ab
(tibetan-pre-write-conversion): Cancel previous
Kenichi Handa <handa@m17n.org>
parents:
23522
diff
changeset
|
325 (set-buffer (generate-new-buffer " *temp*")) |
0d25c6f765ab
(tibetan-pre-write-conversion): Cancel previous
Kenichi Handa <handa@m17n.org>
parents:
23522
diff
changeset
|
326 (if (stringp from) |
0d25c6f765ab
(tibetan-pre-write-conversion): Cancel previous
Kenichi Handa <handa@m17n.org>
parents:
23522
diff
changeset
|
327 (insert from) |
0d25c6f765ab
(tibetan-pre-write-conversion): Cancel previous
Kenichi Handa <handa@m17n.org>
parents:
23522
diff
changeset
|
328 (insert-buffer-substring old-buf from to)) |
0d25c6f765ab
(tibetan-pre-write-conversion): Cancel previous
Kenichi Handa <handa@m17n.org>
parents:
23522
diff
changeset
|
329 (if (not tibetan-decomposed-temp) |
0d25c6f765ab
(tibetan-pre-write-conversion): Cancel previous
Kenichi Handa <handa@m17n.org>
parents:
23522
diff
changeset
|
330 (tibetan-decompose-region (point-min) (point-max))) |
17776
ece62fdeeebb
(tibetan-pre-write-conversion): Make it work
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
331 ;; Should return nil as annotations. |
ece62fdeeebb
(tibetan-pre-write-conversion): Make it work
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
332 nil)) |
17301 | 333 |
18309
bd8b521f5218
Provide XXX-util instead of
Kenichi Handa <handa@m17n.org>
parents:
17993
diff
changeset
|
334 (provide 'tibet-util) |
17301 | 335 |
336 ;;; language/tibet-util.el ends here. |