diff options
| author | Kenichi Handa | 2000-06-12 06:11:56 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-06-12 06:11:56 +0000 |
| commit | 7258f9caa46b374afecc1788dbc79a0412977308 (patch) | |
| tree | 47484b529f496c161dcb1d948223e2cf2670b965 | |
| parent | 95028d95358d94fe937621d590d97e9fc25d54e4 (diff) | |
| download | emacs-7258f9caa46b374afecc1788dbc79a0412977308.tar.gz emacs-7258f9caa46b374afecc1788dbc79a0412977308.zip | |
Convert all tibetan-1-column characters
to the corresponding tibetan characters.
(tibetan-add-components): Delete code for the special treatment of
'a chung.
| -rw-r--r-- | lisp/language/tibet-util.el | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el index a558a6b426f..efa07fa1fa6 100644 --- a/lisp/language/tibet-util.el +++ b/lisp/language/tibet-util.el | |||
| @@ -139,13 +139,25 @@ The returned string has no composition information." | |||
| 139 | (let ((last (last components)) | 139 | (let ((last (last components)) |
| 140 | (stack-upper '(tc . bc)) | 140 | (stack-upper '(tc . bc)) |
| 141 | (stack-under '(bc . tc)) | 141 | (stack-under '(bc . tc)) |
| 142 | rule) | 142 | rule comp-vowel tmp) |
| 143 | ;; Special treatment for 'a chung. | 143 | ;; Special treatment for 'a chung. |
| 144 | ;; If 'a follows a consonant, turn it into the subjoined form. | 144 | ;; If 'a follows a consonant, turn it into the subjoined form. |
| 145 | (if (and (= char ?$(7"A(B) | 145 | ;; * Disabled by Tomabechi 2000/06/09 * |
| 146 | (aref (char-category-set (car last)) ?0)) | 146 | ;; Because in Unicode, $(7"A(B may follow directly a consonant without |
| 147 | (setq char ?$(7"R(B)) ;; modified for new font by Tomabechi 1999/12/10 | 147 | ;; any intervening vowel, as in 4$(7"90"914""0"""Q14"A0"A1!;(B=4$(7"90"91(B 4$(7""0""1(B 4$(7"A0"A1(B not 4$(7"90"91(B 4$(7""0""1(B $(7"Q(B 4$(7"A0"A1(B |
| 148 | 148 | ;;(if (and (= char ?$(7"A(B) | |
| 149 | ;; (aref (char-category-set (car last)) ?0)) | ||
| 150 | ;; (setq char ?$(7"R(B)) ;; modified for new font by Tomabechi 1999/12/10 | ||
| 151 | |||
| 152 | ;; Composite vowel signs are decomposed before being added | ||
| 153 | ;; Added by Tomabechi 2000/06/08 | ||
| 154 | (if (memq char '(?$(7"T(B ?$(7"V(B ?$(7"W(B ?$(7"X(B ?$(7"Y(B ?$(7"Z(B ?$(7"b(B)) | ||
| 155 | (setq comp-vowel | ||
| 156 | (cddr (assoc (char-to-string char) | ||
| 157 | tibetan-composite-vowel-alist)) | ||
| 158 | char | ||
| 159 | (cadr (assoc (char-to-string char) | ||
| 160 | tibetan-composite-vowel-alist)))) | ||
| 149 | (cond | 161 | (cond |
| 150 | ;; Compose upper vowel sign vertically over. | 162 | ;; Compose upper vowel sign vertically over. |
| 151 | ((aref (char-category-set char) ?2) | 163 | ((aref (char-category-set char) ?2) |
| @@ -156,14 +168,12 @@ The returned string has no composition information." | |||
| 156 | (if (eq char ?$(7"Q(B) ;; `$(7"Q(B' should not visible when composed. | 168 | (if (eq char ?$(7"Q(B) ;; `$(7"Q(B' should not visible when composed. |
| 157 | (setq rule nil) | 169 | (setq rule nil) |
| 158 | (setq rule stack-under))) | 170 | (setq rule stack-under))) |
| 159 | |||
| 160 | ;; Transform ra-mgo (superscribed r) if followed by a subjoined | 171 | ;; Transform ra-mgo (superscribed r) if followed by a subjoined |
| 161 | ;; consonant other than w, ', y, r. | 172 | ;; consonant other than w, ', y, r. |
| 162 | ((and (= (car last) ?$(7"C(B) | 173 | ((and (= (car last) ?$(7"C(B) |
| 163 | (not (memq char '(?$(7#>(B ?$(7"R(B ?$(7#B(B ?$(7#C(B)))) | 174 | (not (memq char '(?$(7#>(B ?$(7"R(B ?$(7#B(B ?$(7#C(B)))) |
| 164 | (setcar last ?$(7!"(B) ;; modified for newfont by Tomabechi 1999/12/10 | 175 | (setcar last ?$(7!"(B) ;; modified for newfont by Tomabechi 1999/12/10 |
| 165 | (setq rule stack-under)) | 176 | (setq rule stack-under)) |
| 166 | |||
| 167 | ;; Transform initial base consonant if followed by a subjoined | 177 | ;; Transform initial base consonant if followed by a subjoined |
| 168 | ;; consonant but 'a. | 178 | ;; consonant but 'a. |
| 169 | (t | 179 | (t |
| @@ -176,7 +186,11 @@ The returned string has no composition information." | |||
| 176 | (setq rule stack-under)))) | 186 | (setq rule stack-under)))) |
| 177 | 187 | ||
| 178 | (if rule | 188 | (if rule |
| 179 | (setcdr last (list rule char))))) | 189 | (setcdr last (list rule char))) |
| 190 | ;; Added by Tomabechi 2000/06/08 | ||
| 191 | (if comp-vowel | ||
| 192 | (nconc last comp-vowel)) | ||
| 193 | )) | ||
| 180 | 194 | ||
| 181 | ;;;###autoload | 195 | ;;;###autoload |
| 182 | (defun tibetan-compose-string (str) | 196 | (defun tibetan-compose-string (str) |
| @@ -184,6 +198,7 @@ The returned string has no composition information." | |||
| 184 | (let ((idx 0)) | 198 | (let ((idx 0)) |
| 185 | ;; `$(7"A(B' is included in the pattern for subjoined consonants | 199 | ;; `$(7"A(B' is included in the pattern for subjoined consonants |
| 186 | ;; because we treat it specially in tibetan-add-components. | 200 | ;; because we treat it specially in tibetan-add-components. |
| 201 | ;; (This feature is removed by Tomabechi 2000/06/08) | ||
| 187 | (while (setq idx (string-match tibetan-composable-pattern str idx)) | 202 | (while (setq idx (string-match tibetan-composable-pattern str idx)) |
| 188 | (let ((from idx) | 203 | (let ((from idx) |
| 189 | (to (match-end 0)) | 204 | (to (match-end 0)) |
| @@ -214,6 +229,7 @@ The returned string has no composition information." | |||
| 214 | (goto-char (point-min)) | 229 | (goto-char (point-min)) |
| 215 | ;; `$(7"A(B' is included in the pattern for subjoined consonants | 230 | ;; `$(7"A(B' is included in the pattern for subjoined consonants |
| 216 | ;; because we treat it specially in tibetan-add-components. | 231 | ;; because we treat it specially in tibetan-add-components. |
| 232 | ;; (This feature is removed by Tomabechi 2000/06/08) | ||
| 217 | (while (re-search-forward tibetan-composable-pattern nil t) | 233 | (while (re-search-forward tibetan-composable-pattern nil t) |
| 218 | (let ((from (match-beginning 0)) | 234 | (let ((from (match-beginning 0)) |
| 219 | (to (match-end 0)) | 235 | (to (match-end 0)) |