diff options
| author | Kenichi Handa | 1997-04-05 02:44:02 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-04-05 02:44:02 +0000 |
| commit | 80d75b56bda0ed49084e89550e0f310fedc76e5d (patch) | |
| tree | 2a4c1d870fa33a7f1b0f5380b3c763999858b518 | |
| parent | 37cdc7adb331acefcdd51eada85049c2fda3e63f (diff) | |
| download | emacs-80d75b56bda0ed49084e89550e0f310fedc76e5d.tar.gz emacs-80d75b56bda0ed49084e89550e0f310fedc76e5d.zip | |
Initial revision
| -rw-r--r-- | lisp/language/english.el | 74 | ||||
| -rw-r--r-- | lisp/language/tibet-util.el | 453 | ||||
| -rw-r--r-- | lisp/language/tibetan.el | 620 |
3 files changed, 1147 insertions, 0 deletions
diff --git a/lisp/language/english.el b/lisp/language/english.el new file mode 100644 index 00000000000..e4ff06861ad --- /dev/null +++ b/lisp/language/english.el | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | ;;; english.el --- English support | ||
| 2 | |||
| 3 | ;; Copyright (C) 1997 Free Software Foundation, Inc. | ||
| 4 | ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. | ||
| 5 | |||
| 6 | ;; Keywords: multibyte character, character set, syntax, category | ||
| 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 | ;;; Commentary: | ||
| 26 | |||
| 27 | ;; We need nothing special to support English on Emacs. Selecting | ||
| 28 | ;; English as a language environment is one of the ways to reset | ||
| 29 | ;; various multilingual environment to the original settting. | ||
| 30 | |||
| 31 | ;;; Code | ||
| 32 | |||
| 33 | (defun setup-english-environment () | ||
| 34 | "Reset MULE (multilingual environment) to the default status." | ||
| 35 | (interactive) | ||
| 36 | (setq-default enable-multibyte-characters t) | ||
| 37 | (if (local-variable-p 'enable-multibyte-characters) | ||
| 38 | (setq enable-multibyte-characters t)) | ||
| 39 | |||
| 40 | (setq coding-category-internal 'internal | ||
| 41 | coding-category-iso-7 'iso-2022-7 | ||
| 42 | coding-category-iso-8-1 'iso-8859-1 | ||
| 43 | coding-category-iso-8-2 'iso-8859-1 | ||
| 44 | coding-category-iso-else 'iso-8859-1 | ||
| 45 | coding-category-sjis 'sjis | ||
| 46 | coding-category-big5 'big5 | ||
| 47 | coding-category-binary 'no-conversion) | ||
| 48 | |||
| 49 | (set-coding-priority | ||
| 50 | '(coding-category-iso-7 | ||
| 51 | coding-category-iso-8-2 | ||
| 52 | coding-category-iso-8-1 | ||
| 53 | coding-category-iso-else | ||
| 54 | coding-category-internal | ||
| 55 | coding-category-binary | ||
| 56 | coding-category-sjis | ||
| 57 | coding-category-big5)) | ||
| 58 | |||
| 59 | (setq-default buffer-file-coding-system 'iso-8859-1) | ||
| 60 | (set-terminal-coding-system 'iso-8859-1) | ||
| 61 | (set-keyboard-coding-system 'iso-8859-1) | ||
| 62 | ) | ||
| 63 | |||
| 64 | (set-language-info-alist | ||
| 65 | "English" '((setup-function . setup-english-environment) | ||
| 66 | (tutorial . "TUTORIAL") | ||
| 67 | (charset . (ascii)) | ||
| 68 | (documentation . t) | ||
| 69 | (sample-text . "Hello!, Hi!, How are you?"))) | ||
| 70 | |||
| 71 | (register-input-method "English" | ||
| 72 | '("quail-dvorak" quail-use-package "quail/latin")) | ||
| 73 | |||
| 74 | ;;; english.el ends here | ||
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el new file mode 100644 index 00000000000..cc4624e4014 --- /dev/null +++ b/lisp/language/tibet-util.el | |||
| @@ -0,0 +1,453 @@ | |||
| 1 | ;;; language/tibet-util.el -- Support for inputting Tibetan characters | ||
| 2 | |||
| 3 | ;; Copyright (C) 1995 Free Software Foundation, Inc. | ||
| 4 | ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | ||
| 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 | |||
| 35 | ;;; This function makes a transcription string for | ||
| 36 | ;;; re-composing a character. | ||
| 37 | |||
| 38 | ;;;###autoload | ||
| 39 | (defun tibetan-tibetan-to-transcription (ch) | ||
| 40 | "Return a transcription string of Tibetan character CH" | ||
| 41 | (let ((char ch) | ||
| 42 | (l (append tibetan-consonant-transcription-alist | ||
| 43 | tibetan-vowel-transcription-alist | ||
| 44 | tibetan-precomposed-transcription-alist | ||
| 45 | tibetan-subjoined-transcription-alist)) | ||
| 46 | decomp-l t-char trans str result) | ||
| 47 | (if (eq (char-charset char) 'composition) | ||
| 48 | (setq decomp-l (decompose-composite-char char 'list nil)) | ||
| 49 | (setq decomp-l (cons char nil))) | ||
| 50 | (setq str "") | ||
| 51 | (while decomp-l | ||
| 52 | (setq t-char (char-to-string (car decomp-l))) | ||
| 53 | (setq trans (car (rassoc t-char l))) | ||
| 54 | (setq str (concat str trans)) | ||
| 55 | (setq decomp-l (cdr decomp-l))) | ||
| 56 | (setq result str))) | ||
| 57 | |||
| 58 | ;;; This function translates transcription string into a string of | ||
| 59 | ;;; Tibetan characters. | ||
| 60 | |||
| 61 | ;;;###autoload | ||
| 62 | (defun tibetan-transcription-to-tibetan (transcription) | ||
| 63 | "Translate Roman transcription into a sequence of Tibetan components." | ||
| 64 | (let ((trans transcription) | ||
| 65 | (lp tibetan-precomposed-transcription-alist) | ||
| 66 | (l (append tibetan-consonant-transcription-alist | ||
| 67 | tibetan-vowel-transcription-alist | ||
| 68 | tibetan-subjoined-transcription-alist)) | ||
| 69 | (case-fold-search nil) | ||
| 70 | substr t-char p-str t-str result) | ||
| 71 | (setq substr "") | ||
| 72 | (setq p-str "") | ||
| 73 | (setq t-str "") | ||
| 74 | (cond ((string-match tibetan-precomposed-regexp trans) | ||
| 75 | (setq substr (substring trans (match-beginning 0) (match-end 0))) | ||
| 76 | (setq trans (substring trans (match-end 0))) | ||
| 77 | (setq t-char (cdr (assoc substr lp))) | ||
| 78 | (setq p-str t-char))) | ||
| 79 | (while (string-match tibetan-regexp trans) | ||
| 80 | (setq substr (substring trans (match-beginning 0) (match-end 0))) | ||
| 81 | (setq trans (substring trans 0 (match-beginning 0))) | ||
| 82 | (setq t-char | ||
| 83 | (cdr (assoc substr l))) | ||
| 84 | (setq t-str (concat t-char t-str))) | ||
| 85 | (setq result (concat p-str t-str)))) | ||
| 86 | |||
| 87 | |||
| 88 | ;;; | ||
| 89 | ;;; Functions for composing Tibetan character. | ||
| 90 | ;;; | ||
| 91 | ;;; A Tibetan syllable is typically structured as follows: | ||
| 92 | ;;; | ||
| 93 | ;;; [Prefix] C [C+] V [M] [Suffix [Post suffix]] | ||
| 94 | ;;; | ||
| 95 | ;;; where C's are all vertically stacked, V appears below or above | ||
| 96 | ;;; consonant cluster and M is always put above the C[C+]V combination. | ||
| 97 | ;;; (Sanskrit visarga, though it is a vowel modifier, is considered | ||
| 98 | ;;; to be a punctuation.) | ||
| 99 | ;;; | ||
| 100 | ;;; Here are examples of the words "bsgrubs" and "h'uM" | ||
| 101 | ;;; | ||
| 102 | ;;; $(7"72%q`"U1"7"G(B 2$(7"H`#A`"U0"_1(B | ||
| 103 | ;;; | ||
| 104 | ;;; M | ||
| 105 | ;;; b s b s h | ||
| 106 | ;;; g ' | ||
| 107 | ;;; r u | ||
| 108 | ;;; u | ||
| 109 | ;;; | ||
| 110 | ;;; Consonants ''', 'w', 'y', 'r' take special forms when they are used | ||
| 111 | ;;; as subjoined consonant. Consonant 'r' takes another special form | ||
| 112 | ;;; when used as superjoined as in "rka", and so on, while it does not | ||
| 113 | ;;; change its form when conjoined with subjoined ''', 'w' or 'y' | ||
| 114 | ;;; as in "rwa", "rya". | ||
| 115 | ;;; | ||
| 116 | ;;; | ||
| 117 | ;;; As a Tibetan input method should avoid using conversion key, | ||
| 118 | ;;; we use a "Tibetan glyph -> transcription -> Tibetan glyph" | ||
| 119 | ;;; translation at each key input. | ||
| 120 | ;;; | ||
| 121 | ;;; 1st stage - Check the preceding char. | ||
| 122 | ;;; If the preceding char is Tibetan and composable, then | ||
| 123 | ;;; | ||
| 124 | ;;; 2nd stage - Translate the preceding char into transcription | ||
| 125 | ;;; | ||
| 126 | ;;; 3rd stage - Concatenate the transcription of preceding char | ||
| 127 | ;;; and the current input key. | ||
| 128 | ;;; | ||
| 129 | ;;; 4th stage - Re-translate the concatenated transcription into | ||
| 130 | ;;; a sequence of Tibetan letters. | ||
| 131 | ;;; | ||
| 132 | ;;; 5th stage - Convert leading consonants into one single precomposed char | ||
| 133 | ;;; if possible. | ||
| 134 | ;;; | ||
| 135 | ;;; 6th stage - Compose the consonants into one composite glyph. | ||
| 136 | ;;; | ||
| 137 | ;;; (If the current input is a vowel sign or a vowel modifier, | ||
| 138 | ;;; then it is composed with preceding char without checking | ||
| 139 | ;;; except when the preceding char is a punctuation or a digit.) | ||
| 140 | ;;; | ||
| 141 | ;;; | ||
| 142 | |||
| 143 | ;;; This function is used to avoid composition | ||
| 144 | ;;; between Tibetan and non-Tibetan chars. | ||
| 145 | |||
| 146 | ;;;###autoload | ||
| 147 | (defun tibetan-char-examin (ch) | ||
| 148 | "Check if char CH is Tibetan character. | ||
| 149 | Returns non-nil if CH is Tibetan. Otherwise, returns nil." | ||
| 150 | (let ((chr ch)) | ||
| 151 | (if (eq (char-charset chr) 'composition) | ||
| 152 | (string-match "\\cq+" (decompose-composite-char chr)) | ||
| 153 | (string-match "\\cq" (char-to-string chr))))) | ||
| 154 | |||
| 155 | ;;; This is used to avoid composition between digits, signs, punctuations | ||
| 156 | ;;; and word constituents. | ||
| 157 | |||
| 158 | ;;;###autoload | ||
| 159 | (defun tibetan-composable-examin (ch) | ||
| 160 | "Check if Tibetan char CH is composable. | ||
| 161 | Returns t if CH is a composable char \(i.e. neither punctuation nor digit)." | ||
| 162 | (let ((chr ch) | ||
| 163 | chstr) | ||
| 164 | (if (eq (char-charset chr) 'composition) | ||
| 165 | (setq chstr (decompose-composite-char chr)) | ||
| 166 | (setq chstr (char-to-string chr))) | ||
| 167 | (not (string-match "[$(7!1(B-$(7!o"f$(8!;!=!?!@!A!D"`(B]" chstr)))) | ||
| 168 | |||
| 169 | |||
| 170 | ;;; This checks if a character to be composed contains already | ||
| 171 | ;;; one or more vowels / vowel modifiers. If the character contains | ||
| 172 | ;;; them, then no more consonant should be added. | ||
| 173 | |||
| 174 | ;;;###autoload | ||
| 175 | (defun tibetan-complete-char-examin (ch) | ||
| 176 | "Check if composite char CH contains one or more vowel/vowel modifiers. | ||
| 177 | Returns non-nil, if CH contains vowel/vowel modifiers." | ||
| 178 | (let ((chr ch) | ||
| 179 | chstr) | ||
| 180 | (if (eq (char-charset chr) 'composition) | ||
| 181 | (setq chstr (decompose-composite-char chr)) | ||
| 182 | (setq chstr (char-to-string chr))) | ||
| 183 | (string-match "[$(7!g!e"Q(B-$(7"^"_(B-$(7"l(B]" chstr))) | ||
| 184 | |||
| 185 | ;;; This function makes a composite character consisting of two characters | ||
| 186 | ;;; vertically stacked. | ||
| 187 | |||
| 188 | ;;;###autoload | ||
| 189 | (defun tibetan-vertical-stacking (first second upward) | ||
| 190 | "Return a vertically stacked composite char consisting of FIRST and SECOND. | ||
| 191 | If UPWARD is non-nil, then SECOND is put above FIRST." | ||
| 192 | (if upward | ||
| 193 | (compose-chars first '(tc . bc) second) | ||
| 194 | (compose-chars first '(bc . tc) second))) | ||
| 195 | |||
| 196 | ;;; This function makes a composite char from a string. | ||
| 197 | ;;; Note that this function returns a string, not a char. | ||
| 198 | |||
| 199 | ;;;###autoload | ||
| 200 | (defun tibetan-compose-string (str) | ||
| 201 | "Compose a sequence of Tibetan character components into a composite character. | ||
| 202 | Returns a string containing a composite character." | ||
| 203 | (let ((t-str str) | ||
| 204 | f-str s-str f-ch s-ch rest composed result) | ||
| 205 | ;;Make sure no redundant vowel sign is present. | ||
| 206 | (if (string-match | ||
| 207 | "^\\(.+\\)\\($(7"Q(B\\)\\([$(7!I!g!e"Q(B-$(7"^"_(B-$(7"l(B]\\)" t-str) | ||
| 208 | (setq t-str (concat | ||
| 209 | (match-string 1 t-str) | ||
| 210 | (match-string 3 t-str)))) | ||
| 211 | (if (string-match | ||
| 212 | "^\\(.+\\)\\([$(7!I!g!e"Q(B-$(7"^"_(B-$(7"l(B]\\)\\($(7"Q(B\\)" t-str) | ||
| 213 | (setq t-str (concat | ||
| 214 | (match-string 1 t-str) | ||
| 215 | (match-string 2 t-str)))) | ||
| 216 | ;;Start conversion. | ||
| 217 | (setq result "") | ||
| 218 | ;; Consecutive base/precomposed consonants are reduced to the last one. | ||
| 219 | (while (string-match "^\\([$(7"!(B-$(7"J$!(B-$(7%u(B]\\)\\([$(7"!(B-$(7"@"B(B-$(7"J$!(B-$(7%u(B].*\\)" t-str) | ||
| 220 | (setq result (concat result (match-string 1 t-str))) | ||
| 221 | (setq t-str (match-string 2 t-str))) | ||
| 222 | ;; Vowel/vowel modifier, subjoined consonants are added one by one | ||
| 223 | ;; to the preceding element. | ||
| 224 | (while | ||
| 225 | (string-match "^\\(.\\)\\([$(7"A#!(B-$(7#J!I!g!e"Q(B-$(7"^"_(B-$(7"l(B]\\)\\(.*\\)" t-str) | ||
| 226 | (setq f-str (match-string 1 t-str)) | ||
| 227 | (setq f-ch (string-to-char f-str)) | ||
| 228 | (setq s-str (match-string 2 t-str)) | ||
| 229 | ;;Special treatment for 'a chung. | ||
| 230 | ;;If 'a follows a consonant, then turned into its subjoined form. | ||
| 231 | (if (and (string-match "$(7"A(B" s-str) | ||
| 232 | (not (tibetan-complete-char-examin f-ch))) | ||
| 233 | (setq s-str "$(7#A(B")) | ||
| 234 | (setq s-ch (string-to-char s-str)) | ||
| 235 | (setq rest (match-string 3 t-str)) | ||
| 236 | (cond ((string-match "\\c2" s-str);; upper vowel sign | ||
| 237 | (setq composed | ||
| 238 | (tibetan-vertical-stacking f-ch s-ch t))) | ||
| 239 | ((string-match "\\c3" s-str);; lower vowel sign | ||
| 240 | (setq composed | ||
| 241 | (tibetan-vertical-stacking f-ch s-ch nil))) | ||
| 242 | ;;Automatic conversion of ra-mgo (superscribed r). | ||
| 243 | ;;'r' is converted if followed by a subjoined consonant | ||
| 244 | ;;other than w, ', y, r. | ||
| 245 | ((and (string-match "$(7"C(B" f-str) | ||
| 246 | (not (string-match "[$(7#>#A#B#C(B]" s-str))) | ||
| 247 | (setq f-ch ?$(7#P(B) | ||
| 248 | (setq composed | ||
| 249 | (tibetan-vertical-stacking f-ch s-ch nil))) | ||
| 250 | ((not (tibetan-complete-char-examin f-ch)) | ||
| 251 | ;;Initial base consonant is tranformed, if followed by | ||
| 252 | ;;a subjoined consonant, except when it is followed | ||
| 253 | ;;by a subscribed 'a. | ||
| 254 | (if (and (string-match "[$(7"!(B-$(7"="?"@"D(B-$(7"J(B]" f-str) | ||
| 255 | (not (string-match "$(7#A(B" s-str))) | ||
| 256 | (setq f-ch | ||
| 257 | (string-to-char | ||
| 258 | (cdr (assoc f-str tibetan-base-to-subjoined-alist))))) | ||
| 259 | (setq composed | ||
| 260 | (tibetan-vertical-stacking f-ch s-ch nil))) | ||
| 261 | (t | ||
| 262 | (setq composed s-str) | ||
| 263 | (setq result (concat result f-str)))) | ||
| 264 | (setq t-str (concat composed rest))) | ||
| 265 | (setq result (concat result t-str)))) | ||
| 266 | |||
| 267 | ;;; quail <-> conversion interface. | ||
| 268 | |||
| 269 | (defun tibetan-composition (pc key) | ||
| 270 | "Interface to quail input method. | ||
| 271 | Takes two arguments: char PC and string KEY, where PC is the preceding | ||
| 272 | character to be composed with current input KEY. | ||
| 273 | Returns a string which is the result of composition." | ||
| 274 | (let (trans cur-ch t-str result) | ||
| 275 | ;; Make a tibetan character corresponding to current input key. | ||
| 276 | (setq cur-ch (tibetan-transcription-to-tibetan key)) | ||
| 277 | ;; Check if the preceding character is Tibetan and composable. | ||
| 278 | (cond ((and (tibetan-char-examin pc) | ||
| 279 | (tibetan-composable-examin pc)) | ||
| 280 | ;;If Tibetan char corresponding to the current input key exists, | ||
| 281 | (cond (cur-ch | ||
| 282 | ;; Then, | ||
| 283 | ;; Convert the preceding character into transcription, | ||
| 284 | ;; and concatenate it with the current input key, | ||
| 285 | (setq trans (tibetan-tibetan-to-transcription pc)) | ||
| 286 | (setq trans (concat trans key)) | ||
| 287 | ;; Concatenated transcription is converted to | ||
| 288 | ;; a sequence of Tibetan characters, | ||
| 289 | (setq t-str (tibetan-transcription-to-tibetan trans)) | ||
| 290 | ;; And it is composed into a composite character. | ||
| 291 | (setq result (tibetan-compose-string t-str))) | ||
| 292 | ;; Else, | ||
| 293 | (t | ||
| 294 | ;; Simply concatenate the preceding character and | ||
| 295 | ;; the current input key. | ||
| 296 | (setq result (char-to-string pc)) | ||
| 297 | (setq result (concat result key))))) | ||
| 298 | ;; If the preceding char is not Tibetan or not composable, | ||
| 299 | (t | ||
| 300 | ;; pc = 0 means the point is at the beginning of buffer. | ||
| 301 | (if (not (eq pc 0)) | ||
| 302 | (setq result (char-to-string pc))) | ||
| 303 | (if cur-ch | ||
| 304 | (setq result (concat result cur-ch)) | ||
| 305 | (setq result (concat result key)))) | ||
| 306 | ))) | ||
| 307 | |||
| 308 | |||
| 309 | ;;;###autoload | ||
| 310 | (defun tibetan-decompose-region (beg end) | ||
| 311 | "Decompose Tibetan characters in the region BEG END into their components. | ||
| 312 | Components are: base and subjoined consonants, vowel signs, vowel modifiers. | ||
| 313 | One column punctuations are converted to their 2 column equivalents." | ||
| 314 | (interactive "r") | ||
| 315 | (let (ch-str ch-beg ch-end) | ||
| 316 | (save-excursion | ||
| 317 | (save-restriction | ||
| 318 | (narrow-to-region beg end) | ||
| 319 | (goto-char (point-min)) | ||
| 320 | ;; \\cq = Tibetan character | ||
| 321 | (while (re-search-forward "\\cq" nil t) | ||
| 322 | (setq ch-str (buffer-substring-no-properties | ||
| 323 | (match-beginning 0) (match-end 0))) | ||
| 324 | ;; Save the points. Maybe, using save-match-data is preferable. | ||
| 325 | ;; But in order not to lose the trace(because the body is too long), | ||
| 326 | ;; we save the points in variables. | ||
| 327 | (setq ch-beg (match-beginning 0)) | ||
| 328 | (setq ch-end (match-end 0)) | ||
| 329 | ;; Here starts the decomposition. | ||
| 330 | (cond | ||
| 331 | ;; 1 column punctuations -> 2 column equivalent | ||
| 332 | ((string-match "[$(8!D!;!=!?!@!A"`(B]" ch-str) | ||
| 333 | (setq ch-str | ||
| 334 | (car (rassoc ch-str tibetan-precomposition-rule-alist)))) | ||
| 335 | ;; Decomposition of composite character. | ||
| 336 | ((eq (char-charset (string-to-char ch-str)) 'composition) | ||
| 337 | ;; Make a string which consists of a sequence of | ||
| 338 | ;; components. | ||
| 339 | (setq ch-str (decompose-composite-char (string-to-char ch-str))) | ||
| 340 | ;; Converts nyi zla into base elements. | ||
| 341 | (cond ((string= ch-str "$(7#R#S#S#S(B") | ||
| 342 | (setq ch-str "$(7!4!5!5(B")) | ||
| 343 | ((string= ch-str "$(7#R#S#S(B") | ||
| 344 | (setq ch-str "$(7!4!5(B")) | ||
| 345 | ((string= ch-str "$(7#R#S!I(B") | ||
| 346 | (setq ch-str "$(7!6(B")) | ||
| 347 | ((string= ch-str "$(7#R#S(B") | ||
| 348 | (setq ch-str "$(7!4(B"))))) | ||
| 349 | ;; If the sequence of components starts with a subjoined consonants, | ||
| 350 | (if (string-match "^\\([$(7#!(B-$(7#J(B]\\)\\(.*\\)$" ch-str) | ||
| 351 | ;; then the first components is converted to its base form. | ||
| 352 | (setq ch-str | ||
| 353 | (concat (car (rassoc (match-string 1 ch-str) | ||
| 354 | tibetan-base-to-subjoined-alist)) | ||
| 355 | (match-string 2 ch-str)))) | ||
| 356 | ;; If the sequence of components starts with a precomposed character, | ||
| 357 | (if (string-match "^\\([$(7$!(B-$(7%u(B]\\)\\(.*\\)$" ch-str) | ||
| 358 | ;; then it is converted into a sequence of components. | ||
| 359 | (setq ch-str | ||
| 360 | (concat (car (rassoc (match-string 1 ch-str) | ||
| 361 | tibetan-precomposition-rule-alist)) | ||
| 362 | (match-string 2 ch-str)))) | ||
| 363 | ;; Special treatment for superscribed r. | ||
| 364 | (if (string-match "^$(7#P(B\\(.*\\)$" ch-str) | ||
| 365 | (setq ch-str (concat "$(7"C(B" (match-string 1 ch-str)))) | ||
| 366 | ;; Finally, the result of decomposition is inserted, and | ||
| 367 | ;; the composite character is deleted. | ||
| 368 | (insert-and-inherit ch-str) | ||
| 369 | (delete-region ch-beg ch-end)))))) | ||
| 370 | |||
| 371 | ;;;###autoload | ||
| 372 | (defun tibetan-compose-region (beg end) | ||
| 373 | "Make composite chars from Tibetan character components in the region BEG END. | ||
| 374 | Two column punctuations are converted to their 1 column equivalents." | ||
| 375 | (interactive "r") | ||
| 376 | (let (str result) | ||
| 377 | (save-excursion | ||
| 378 | (save-restriction | ||
| 379 | (narrow-to-region beg end) | ||
| 380 | (goto-char (point-min)) | ||
| 381 | ;; First, sequence of components which has a precomposed equivalent | ||
| 382 | ;; is converted. | ||
| 383 | (while (re-search-forward | ||
| 384 | tibetan-precomposition-rule-regexp nil t) | ||
| 385 | (setq str (buffer-substring-no-properties | ||
| 386 | (match-beginning 0) (match-end 0))) | ||
| 387 | (save-match-data | ||
| 388 | (insert-and-inherit | ||
| 389 | (cdr (assoc str tibetan-precomposition-rule-alist)))) | ||
| 390 | (delete-region (match-beginning 0) (match-end 0))) | ||
| 391 | (goto-char (point-min)) | ||
| 392 | ;; Then, composable elements are put into a composite character. | ||
| 393 | (while (re-search-forward | ||
| 394 | "[$(7"!(B-$(7"J$!(B-$(7%u(B]+[$(7#!(B-$(7#J!I!g!e"Q(B-$(7"^"_(B-$(7"l(B]+" | ||
| 395 | nil t) | ||
| 396 | (setq str (buffer-substring-no-properties | ||
| 397 | (match-beginning 0) (match-end 0))) | ||
| 398 | (save-match-data | ||
| 399 | (setq result (tibetan-compose-string str)) | ||
| 400 | (insert-and-inherit result)) | ||
| 401 | (delete-region (match-beginning 0) (match-end 0))))))) | ||
| 402 | |||
| 403 | ;;; | ||
| 404 | ;;; This variable is used to avoid repeated decomposition. | ||
| 405 | ;;; | ||
| 406 | (setq-default tibetan-decomposed nil) | ||
| 407 | |||
| 408 | ;;;###autoload | ||
| 409 | (defun tibetan-decompose-buffer () | ||
| 410 | "Decomposes Tibetan characters in the buffer into their components. | ||
| 411 | See also docstring of the function tibetan-decompose-region." | ||
| 412 | (interactive) | ||
| 413 | (make-local-variable 'tibetan-decomposed) | ||
| 414 | (cond ((not tibetan-decomposed) | ||
| 415 | (tibetan-decompose-region (point-min) (point-max)) | ||
| 416 | (setq tibetan-decomposed t)))) | ||
| 417 | |||
| 418 | ;;;###autoload | ||
| 419 | (defun tibetan-compose-buffer () | ||
| 420 | "Composes Tibetan character components in the buffer. | ||
| 421 | See also docstring of the function tibetan-compose-region." | ||
| 422 | (interactive) | ||
| 423 | (make-local-variable 'tibetan-decomposed) | ||
| 424 | (tibetan-compose-region (point-min) (point-max)) | ||
| 425 | (setq tibetan-decomposed nil)) | ||
| 426 | |||
| 427 | ;;;###autoload | ||
| 428 | (defun tibetan-post-read-conversion (len) | ||
| 429 | (save-excursion | ||
| 430 | (save-restriction | ||
| 431 | (let ((buffer-modified-p (buffer-modified-p))) | ||
| 432 | (narrow-to-region (point) (+ (point) len)) | ||
| 433 | (tibetan-compose-region (point-min) (point-max)) | ||
| 434 | (set-buffer-modified-p buffer-modified-p) | ||
| 435 | (point-max)))) | ||
| 436 | (make-local-variable 'tibetan-decomposed) | ||
| 437 | (setq tibetan-decomposed nil)) | ||
| 438 | |||
| 439 | |||
| 440 | ;;;###autoload | ||
| 441 | (defun tibetan-pre-write-conversion (from to) | ||
| 442 | (setq tibetan-decomposed-temp tibetan-decomposed) | ||
| 443 | (let ((old-buf (current-buffer)) | ||
| 444 | (work-buf (get-buffer-create " *tibetan-work*"))) | ||
| 445 | (set-buffer work-buf) | ||
| 446 | (erase-buffer) | ||
| 447 | (insert-buffer-substring old-buf from to) | ||
| 448 | (if (not tibetan-decomposed-temp) | ||
| 449 | (tibetan-decompose-region (point-min) (point-max))))) | ||
| 450 | |||
| 451 | (provide 'language/tibet-util) | ||
| 452 | |||
| 453 | ;;; language/tibet-util.el ends here. | ||
diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el new file mode 100644 index 00000000000..d54689119c6 --- /dev/null +++ b/lisp/language/tibetan.el | |||
| @@ -0,0 +1,620 @@ | |||
| 1 | ;;; tibetan.el --- Support for Tibetan language | ||
| 2 | |||
| 3 | ;; Copyright (C) 1997 Free Software Foundation, Inc. | ||
| 4 | ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. | ||
| 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 for special signs and punctuations. | ||
| 31 | |||
| 32 | ;;; Code: | ||
| 33 | |||
| 34 | (define-category ?q "Tibetan") | ||
| 35 | (modify-category-entry (make-char 'tibetan) ?q) | ||
| 36 | (modify-category-entry (make-char 'tibetan-1-column) ?q) | ||
| 37 | |||
| 38 | (let ((row 33)) | ||
| 39 | (while (< row 38) | ||
| 40 | (modify-category-entry (make-char 'tibetan row) ?q) | ||
| 41 | (setq row (1+ row)))) | ||
| 42 | |||
| 43 | (modify-category-entry (make-char 'tibetan-1-column 33) ?q) | ||
| 44 | |||
| 45 | (let ((deflist '(;; chars syntax category | ||
| 46 | ("$(7"!(B-$(7"J(B" "w" ?0) ; consonant | ||
| 47 | ("$(7#!(B-$(7#J#P#Q(B" "w" ?0) ; | ||
| 48 | ("$(7$!(B-$(7$e(B" "w" ?0) ; | ||
| 49 | ("$(7%!(B-$(7%u(B" "w" ?0) ; | ||
| 50 | ("$(7"S"["\"]"^"a(B" "w" ?2) ; upper vowel | ||
| 51 | ("$(7"_"c"d"g"h"i"j"k"l(B" "w" ?2) ; upper modifier | ||
| 52 | ("$(7!I"Q"U"e!e!g(B" "w" ?3) ; lowel vowel/modifier | ||
| 53 | ("$(7!P(B-$(7!Y!Z(B-$(7!c(B" "w" ?6) ; digit | ||
| 54 | ("$(7!;!=(B-$(7!B!D"`(B" "." ?|) ; line-break char | ||
| 55 | ("$(8!;!=!?!@!A!D"`(B" "." ?|) ; | ||
| 56 | ("$(7!8!;!=(B-$(7!B!D"`!m!d(B" "." ?>) ; prohibition | ||
| 57 | ("$(8!;!=!?!@!A!D"`(B" "." ?>) ; | ||
| 58 | ("$(7!0(B-$(7!:!l#R#S"f(B" "." ?<) ; prohibition | ||
| 59 | ("$(7!C!E(B-$(7!H!J(B-$(7!O!f!h(B-$(7!k!n!o(B" "." ?q) ; others | ||
| 60 | )) | ||
| 61 | elm chars len syntax category to ch i) | ||
| 62 | (while deflist | ||
| 63 | (setq elm (car deflist)) | ||
| 64 | (setq chars (car elm) | ||
| 65 | len (length chars) | ||
| 66 | syntax (nth 1 elm) | ||
| 67 | category (nth 2 elm) | ||
| 68 | i 0) | ||
| 69 | (while (< i len) | ||
| 70 | (if (= (aref chars i) ?-) | ||
| 71 | (setq i (1+ i) | ||
| 72 | to (sref chars i)) | ||
| 73 | (setq ch (sref chars i) | ||
| 74 | to ch)) | ||
| 75 | (while (<= ch to) | ||
| 76 | (modify-syntax-entry ch syntax) | ||
| 77 | (modify-category-entry ch category) | ||
| 78 | (setq ch (1+ ch))) | ||
| 79 | (setq i (+ i (char-bytes to)))) | ||
| 80 | (setq deflist (cdr deflist)))) | ||
| 81 | |||
| 82 | |||
| 83 | ;;; Tibetan Character set. | ||
| 84 | ;;; \x2130 -- \x234a is a subset of Unicode v.2 \x0f00 - \x0fb9 | ||
| 85 | ;;; with a slight modification. And there are some subjoined | ||
| 86 | ;;; consonants which are not specified in Unicode. | ||
| 87 | ;;; I hope I can add missing characters later. | ||
| 88 | ;;; | ||
| 89 | ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | ||
| 90 | ;;;2120 // $(7!!(B $(7!"(B $(7!#(B $(7!$(B $(7!%(B $(7!&(B $(7!'(B $(7!((B $(7!)(B $(7!*(B $(7!+(B $(7!,(B $(7!-(B $(7!.(B $(7!/(B ; | ||
| 91 | ;;;2130 $(7!0(B $(7!1(B $(7!2(B $(7!3(B $(7!4(B $(7!5(B $(7!6(B $(7!7(B $(7!8(B $(7!9(B $(7!:(B $(7!;(B $(7!<(B $(7!=(B $(7!>(B $(7!?(B ; Punctuations, | ||
| 92 | ;;;2140 $(7!@(B $(7!A(B $(7!B(B $(7!C(B $(7!D(B $(7!E(B $(7!F(B $(7!G(B $(7!H(B $(7!I(B $(7!J(B $(7!K(B $(7!L(B $(7!M(B $(7!N(B $(7!O(B ; Digits and | ||
| 93 | ;;;2150 $(7!P(B $(7!Q(B $(7!R(B $(7!S(B $(7!T(B $(7!U(B $(7!V(B $(7!W(B $(7!X(B $(7!Y(B $(7!Z(B $(7(B $(7"*(B $(7"+(B $(7",(B $(7"-(B $(7".(B $(7"/(B ; Base consonants | ||
| 99 | ;;;2230 $(7"0(B $(7"1(B $(7"2(B $(7"3(B $(7"4(B $(7"5(B $(7"6(B $(7"7(B $(7"8(B $(7"9(B $(7":(B $(7";(B $(7"<(B $(7"=(B $(7">(B $(7"?(B ; and | ||
| 100 | ;;;2240 $(7"@(B $(7"A(B $(7"B(B $(7"C(B $(7"D(B $(7"E(B $(7"F(B $(7"G(B $(7"H(B $(7"I(B $(7"J(B $(7"K(B $(7"L(B $(7"M(B $(7"N(B $(7"O(B ; Vowel signs. | ||
| 101 | ;;;2250 $(7"P(B $(7"Q(B $(7"R(B $(7"S(B $(7"T(B $(7"U(B $(7"V(B $(7"W(B $(7"X(B $(7"Y(B $(7"Z(B $(7"[(B $(7"\(B $(7"](B $(7"^(B $(7"_(B ; (\x2251 = vowel a) | ||
| 102 | ;;;2260 $(7"`(B $(7"a(B $(7"b(B $(7"c(B $(7"d(B $(7"e(B $(7"f(B $(7"g(B $(7"h(B $(7"i(B $(7"j(B $(7"k(B $(7"l(B $(7"m(B $(7"n(B $(7"o(B ; Long vowels and | ||
| 103 | ;;;2270 $(7"p(B $(7"q(B $(7"r(B $(7"s(B $(7"t(B $(7"u(B $(7"v(B $(7"w(B $(7"x(B $(7"y(B $(7"z(B $(7"{(B $(7"|(B $(7"}(B $(7"~(B // ; vocalic r, l are | ||
| 104 | ;;; ; not atomically | ||
| 105 | ;;; ; encoded. | ||
| 106 | ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | ||
| 107 | ;;;2320 // $(7#!(B $(7#"(B $(7##(B $(7#$(B $(7#%(B $(7#&(B $(7#'(B $(7#((B $(7#)(B $(7#*(B $(7#+(B $(7#,(B $(7#-(B $(7#.(B $(7#/(B ; Subjoined consonants | ||
| 108 | ;;;2330 $(7#0(B $(7#1(B $(7#2(B $(7#3(B $(7#4(B $(7#5(B $(7#6(B $(7#7(B $(7#8(B $(7#9(B $(7#:(B $(7#;(B $(7#<(B $(7#=(B $(7#>(B $(7#?(B ; | ||
| 109 | ;;;2340 $(7#@(B $(7#A(B $(7#B(B $(7#C(B $(7#D(B $(7#E(B $(7#F(B $(7#G(B $(7#H(B $(7#I(B $(7#J(B $(7#K(B $(7#L(B $(7#M(B $(7#N(B $(7#O(B ; 'a chung (\x2341)is | ||
| 110 | ;;; ; here, | ||
| 111 | ;;; ; while in Unicode | ||
| 112 | ;;; ; it is classified | ||
| 113 | ;;; ; as a vowel sign | ||
| 114 | ;;; ; (\x0f71). | ||
| 115 | ;;; | ||
| 116 | ;;;2350 $(7#P(B $(7#Q(B $(7#R(B $(7#S(B $(7#T(B $(7#U(B $(7#V(B $(7#W(B $(7#X(B $(7#Y(B $(7#Z(B $(7#[(B $(7#\(B $(7#](B $(7#^(B $(7#_(B ; Hereafter, the chars | ||
| 117 | ;;;2360 $(7#`(B $(7#a(B $(7#b(B $(7#c(B $(7#d(B $(7#e(B $(7#f(B $(7#g(B $(7#h(B $(7#i(B $(7#j(B $(7#k(B $(7#l(B $(7#m(B $(7#n(B $(7#o(B ; are not specified | ||
| 118 | ;;;2370 $(7#p(B $(7#q(B $(7#r(B $(7#s(B $(7#t(B $(7#u(B $(7#v(B $(7#w(B $(7#x(B $(7#y(B $(7#z(B $(7#{(B $(7#|(B $(7#}(B $(7#~(B // ; in Unicode. | ||
| 119 | ;;; ; The character \x2351 | ||
| 120 | ;;; ; is not used in our | ||
| 121 | ;;; ; implementation. | ||
| 122 | ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | ||
| 123 | ;;;2420 // $(7$!(B $(7$"(B $(7$#(B $(7$$(B $(7$%(B $(7$&(B $(7$'(B $(7$((B $(7$)(B $(7$*(B $(7$+(B $(7$,(B $(7$-(B $(7$.(B $(7$/(B ; Precomposed | ||
| 124 | ;;;2430 $(7$0(B $(7$1(B $(7$2(B $(7$3(B $(7$4(B $(7$5(B $(7$6(B $(7$7(B $(7$8(B $(7$9(B $(7$:(B $(7$;(B $(7$<(B $(7$=(B $(7$>(B $(7$?(B ; consonants for | ||
| 125 | ;;;2440 $(7$@(B $(7$A(B $(7$B(B $(7$C(B $(7$D(B $(7$E(B $(7$F(B $(7$G(B $(7$H(B $(7$I(B $(7$J(B $(7$K(B $(7$L(B $(7$M(B $(7$N(B $(7$O(B ; ordinary Tibetan. | ||
| 126 | ;;;2450 $(7$P(B $(7$Q(B $(7$R(B $(7$S(B $(7$T(B $(7$U(B $(7$V(B $(7$W(B $(7$X(B $(7$Y(B $(7$Z(B $(7$[(B $(7$\(B $(7$](B $(7$^(B $(7$_(B ; They are decomposed | ||
| 127 | ;;;2460 $(7$`(B $(7$a(B $(7$b(B $(7$c(B $(7$d(B $(7$e(B $(7$f(B $(7$g(B $(7$h(B $(7$i(B $(7$j(B $(7$k(B $(7$l(B $(7$m(B $(7$n(B $(7$o(B ; into base and | ||
| 128 | ;;;2470 $(7$p(B $(7$q(B $(7$r(B $(7$s(B $(7$t(B $(7$u(B $(7$v(B $(7$w(B $(7$x(B $(7$y(B $(7$z(B $(7${(B $(7$|(B $(7$}(B $(7$~(B // ; subjoined consonants | ||
| 129 | ;;; ; when written on a | ||
| 130 | ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ; file in Tibetan | ||
| 131 | ;;;2520 // $(7%!(B $(7%"(B $(7%#(B $(7%$(B $(7%%(B $(7%&(B $(7%'(B $(7%((B $(7%)(B $(7%*(B $(7%+(B $(7%,(B $(7%-(B $(7%.(B $(7%/(B ; coding system. | ||
| 132 | ;;;2530 $(7%0(B $(7%1(B $(7%2(B $(7%3(B $(7%4(B $(7%5(B $(7%6(B $(7%7(B $(7%8(B $(7%9(B $(7%:(B $(7%;(B $(7%<(B $(7%=(B $(7%>(B $(7%?(B ; | ||
| 133 | ;;;2540 $(7%@(B $(7%A(B $(7%B(B $(7%C(B $(7%D(B $(7%E(B $(7%F(B $(7%G(B $(7%H(B $(7%I(B $(7%J(B $(7%K(B $(7%L(B $(7%M(B $(7%N(B $(7%O(B ; | ||
| 134 | ;;;2550 $(7%P(B $(7%Q(B $(7%R(B $(7%S(B $(7%T(B $(7%U(B $(7%V(B $(7%W(B $(7%X(B $(7%Y(B $(7%Z(B $(7%[(B $(7%\(B $(7%](B $(7%^(B $(7%_(B ; | ||
| 135 | ;;;2560 $(7%`(B $(7%a(B $(7%b(B $(7%c(B $(7%d(B $(7%e(B $(7%f(B $(7%g(B $(7%h(B $(7%i(B $(7%j(B $(7%k(B $(7%l(B $(7%m(B $(7%n(B $(7%o(B ; | ||
| 136 | ;;;2570 $(7%p(B $(7%q(B $(7%r(B $(7%s(B $(7%t(B $(7%u(B $(7%v(B $(7%w(B $(7%x(B $(7%y(B $(7%z(B $(7%{(B $(7%|(B $(7%}(B $(7%~(B // ; | ||
| 137 | ;;; | ||
| 138 | |||
| 139 | |||
| 140 | (make-coding-system | ||
| 141 | 'tibetan 2 ?Q | ||
| 142 | "Coding-system used for ASCII(MSB=0) & TIBETAN(MSB=1)." | ||
| 143 | '((ascii t) (tibetan t) nil nil | ||
| 144 | nil ascii-eol)) | ||
| 145 | |||
| 146 | (put 'tibetan 'post-read-conversion 'tibetan-post-read-conversion) | ||
| 147 | (put 'tibetan 'pre-write-conversion 'tibetan-pre-write-conversion) | ||
| 148 | |||
| 149 | (register-input-method | ||
| 150 | "Tibetan" '("quail-tibetan-wylie" quail-use-package "quail/tibetan")) | ||
| 151 | (register-input-method | ||
| 152 | "Tibetan" '("quail-tibetan-tibkey" quail-use-package "quail/tibetan")) | ||
| 153 | |||
| 154 | (defun setup-tibetan-environment () | ||
| 155 | (setq coding-category-iso-7 'tibetan) | ||
| 156 | |||
| 157 | (set-coding-priority | ||
| 158 | '(coding-category-iso-7 | ||
| 159 | coding-category-iso-8-1)) | ||
| 160 | |||
| 161 | (setq-default buffer-file-coding-system 'iso-2022-7) | ||
| 162 | |||
| 163 | (setq default-input-method '("Tibetan" . "quail-tibetan-wylie"))) | ||
| 164 | |||
| 165 | (set-language-info-alist | ||
| 166 | "Tibetan" '((setup-function . setup-tibetan-environment) | ||
| 167 | (charset . (tibetan tibetan-1-column)) | ||
| 168 | (coding-system . (tibetan)) | ||
| 169 | (documentation . t) | ||
| 170 | (sample-text . | ||
| 171 | "Tibetan (2$(7"70"]1"2$(8!;2$(7%P`"Q1"2$(8!;(B) 2$(7#RP#SP#S1!>"72$P`"Q1$(8!;2$(7"E0"S1"G$(8!;$(7"72"20"[1$(8!;2$(7"D0"[1"#"G!>2"I0"]0"_1$(8!;2$(7"9`"Q1$(8!;2$(7"/0"S1$(8!;2$(7"5`"Q12#2`#90"[1$(8!;2$(7"H`#A`"U0"c1!>(B"))) | ||
| 172 | |||
| 173 | |||
| 174 | ;;; | ||
| 175 | ;;; Definitions of conversion data. | ||
| 176 | ;;; | ||
| 177 | |||
| 178 | |||
| 179 | ;;; alists for tibetan char <-> transcription conversion | ||
| 180 | ;;; longer transcription should come first | ||
| 181 | (defconst tibetan-consonant-transcription-alist | ||
| 182 | '(("tsh" . "$(7";(B") | ||
| 183 | ("dzh" . "$(7"=(B") | ||
| 184 | ("kSH" . "$(7"J(B") | ||
| 185 | ("kh" . "$(7""(B") | ||
| 186 | ("gh" . "$(7"$(B") | ||
| 187 | ("ng" . "$(7"%(B") | ||
| 188 | ("ch" . "$(7"'(B") | ||
| 189 | ("ny" . "$(7"*(B") | ||
| 190 | ("TH" . "$(7",(B") | ||
| 191 | ("DH" . "$(7".(B") | ||
| 192 | ("th" . "$(7"1(B") | ||
| 193 | ("dh" . "$(7"3(B") | ||
| 194 | ("ph" . "$(7"6(B") | ||
| 195 | ("bh" . "$(7"8(B") | ||
| 196 | ("ts" . "$(7":(B") | ||
| 197 | ("dz" . "$(7"<(B") | ||
| 198 | ("zh" . "$(7"?(B") | ||
| 199 | ("sh" . "$(7"E(B") | ||
| 200 | ("SH" . "$(7"F(B") | ||
| 201 | ("k" . "$(7"!(B") | ||
| 202 | ("g" . "$(7"#(B") | ||
| 203 | ("c" . "$(7"&(B") | ||
| 204 | ("j" . "$(7"((B") | ||
| 205 | ("T" . "$(7"+(B") | ||
| 206 | ("D" . "$(7"-(B") | ||
| 207 | ("N" . "$(7"/(B") | ||
| 208 | ("t" . "$(7"0(B") | ||
| 209 | ("d" . "$(7"2(B") | ||
| 210 | ("n" . "$(7"4(B") | ||
| 211 | ("p" . "$(7"5(B") | ||
| 212 | ("b" . "$(7"7(B") | ||
| 213 | ("m" . "$(7"9(B") | ||
| 214 | ("w" . "$(7">(B") | ||
| 215 | ("z" . "$(7"@(B") | ||
| 216 | ("'" . "$(7"A(B") | ||
| 217 | ("y" . "$(7"B(B") | ||
| 218 | ("r" . "$(7"C(B") | ||
| 219 | ("l" . "$(7"D(B") | ||
| 220 | ("s" . "$(7"G(B") | ||
| 221 | ("h" . "$(7"H(B") | ||
| 222 | ("H" . "$(7"H(B") | ||
| 223 | ("A" . "$(7"I(B"))) | ||
| 224 | |||
| 225 | |||
| 226 | (defconst tibetan-vowel-transcription-alist | ||
| 227 | '(("ai" . "$(7"\(B") | ||
| 228 | ("au" . "$(7"^(B") | ||
| 229 | ("ee" . "$(7"\(B") | ||
| 230 | ("oo" . "$(7"^(B") | ||
| 231 | ("a" . "$(7"Q(B") ; invisible vowel sign (\x2251) | ||
| 232 | ("i" . "$(7"S(B") | ||
| 233 | ("u" . "$(7"U(B") | ||
| 234 | ("e" . "$(7"[(B") | ||
| 235 | ("o" . "$(7"](B") | ||
| 236 | ("E" . "$(7"\(B") | ||
| 237 | ("O" . "$(7"^(B") | ||
| 238 | ("I" . "$(7"a(B") | ||
| 239 | ("M" . "$(7"_(B") | ||
| 240 | ("~" . "$(7"c(B") ; not specified in Ext.wylie | ||
| 241 | ("`" . "$(7"d(B") ; idem. | ||
| 242 | ("," . "$(7"e(B") ; idem. | ||
| 243 | ("v" . "$(7"g(B") ; idem. | ||
| 244 | ("V" . "$(7"h(B") ; idem. | ||
| 245 | ("x" . "$(7"i(B") ; idem. | ||
| 246 | ("X" . "$(7"j(B") ; idem. | ||
| 247 | ("q" . "$(7"k(B") ; idem. | ||
| 248 | ("Q" . "$(7"l(B") ; idem. | ||
| 249 | ("_o" . "$(7!g(B") ; idem. | ||
| 250 | ("_O" . "$(7!e(B") ; idem. | ||
| 251 | ("_/" . "$(7!I(B") ; idem. | ||
| 252 | )) | ||
| 253 | |||
| 254 | (defconst tibetan-precomposed-transcription-alist | ||
| 255 | '(("phyw" . "$(7$G(B") | ||
| 256 | ("tshw" . "$(7$)(B") | ||
| 257 | ("rtsw" . "$(7%.(B") | ||
| 258 | ("khw" . "$(7$"(B") | ||
| 259 | ("nyw" . "$(7$%(B") | ||
| 260 | ("tsw" . "$(7$((B") | ||
| 261 | ("zhw" . "$(7$*(B") | ||
| 262 | ("shw" . "$(7$.(B") | ||
| 263 | ("khy" . "$(7$A(B") | ||
| 264 | ("phy" . "$(7$D(B") | ||
| 265 | ("khr" . "$(7$Q(B") | ||
| 266 | ("thr" . "$(7$T(B") | ||
| 267 | ("phr" . "$(7$W(B") | ||
| 268 | ("shr" . "$(7$Z(B") | ||
| 269 | ("dzr" . "$(7$^(B") | ||
| 270 | ("grw" . "$(7$_(B") | ||
| 271 | ("rng" . "$(7%#(B") | ||
| 272 | ("rny" . "$(7%%(B") | ||
| 273 | ("rts" . "$(7%+(B") | ||
| 274 | ("rdz" . "$(7%,(B") | ||
| 275 | ("rgw" . "$(7%-(B") | ||
| 276 | ("rky" . "$(7%0(B") | ||
| 277 | ("rgy" . "$(7%1(B") | ||
| 278 | ("rmy" . "$(7%2(B") | ||
| 279 | ("lng" . "$(7%B(B") | ||
| 280 | ("sng" . "$(7%R(B") | ||
| 281 | ("sny" . "$(7%S(B") | ||
| 282 | ("sts" . "$(7%Z(B") | ||
| 283 | ("sky" . "$(7%`(B") | ||
| 284 | ("sgy" . "$(7%a(B") | ||
| 285 | ("spy" . "$(7%b(B") | ||
| 286 | ("sby" . "$(7%c(B") | ||
| 287 | ("smy" . "$(7%d(B") | ||
| 288 | ("skr" . "$(7%p(B") | ||
| 289 | ("sgr" . "$(7%q(B") | ||
| 290 | ("snr" . "$(7%r(B") | ||
| 291 | ("spr" . "$(7%s(B") | ||
| 292 | ("sbr" . "$(7%t(B") | ||
| 293 | ("smr" . "$(7%u(B") | ||
| 294 | ("kw" . "$(7$!(B") | ||
| 295 | ("gw" . "$(7$#(B") | ||
| 296 | ("cw" . "$(7$$(B") | ||
| 297 | ("tw" . "$(7$&(B") | ||
| 298 | ("dw" . "$(7$'(B") | ||
| 299 | ("zw" . "$(7$+(B") | ||
| 300 | ("rw" . "$(7$,(B") | ||
| 301 | ("lw" . "$(7$-(B") | ||
| 302 | ("sw" . "$(7$/(B") | ||
| 303 | ("hw" . "$(7$0(B") | ||
| 304 | ("ky" . "$(7$@(B") | ||
| 305 | ("gy" . "$(7$B(B") | ||
| 306 | ("py" . "$(7$C(B") | ||
| 307 | ("by" . "$(7$E(B") | ||
| 308 | ("my" . "$(7$F(B") | ||
| 309 | ("kr" . "$(7$P(B") | ||
| 310 | ("gr" . "$(7$R(B") | ||
| 311 | ("tr" . "$(7$S(B") | ||
| 312 | ("dr" . "$(7$U(B") | ||
| 313 | ("pr" . "$(7$V(B") | ||
| 314 | ("brk" . "$(7"7%!(B") | ||
| 315 | ("brg" . "$(7"7%"(B") | ||
| 316 | ("brng" . "$(7"7%#(B") | ||
| 317 | ("brj" . "$(7"7%$(B") | ||
| 318 | ("brny" . "$(7"7%%(B") | ||
| 319 | ("brt" . "$(7"7%&(B") | ||
| 320 | ("brd" . "$(7"7%'(B") | ||
| 321 | ("brn" . "$(7"7%((B") | ||
| 322 | ("brts" . "$(7"7%+(B") | ||
| 323 | ("brdz" . "$(7"7%,(B") | ||
| 324 | ("brl" . "$(7"7$d(B") | ||
| 325 | ("br" . "$(7$X(B") | ||
| 326 | ("mr" . "$(7$Y(B") | ||
| 327 | ("sr" . "$(7$[(B") | ||
| 328 | ("hr" . "$(7$\(B") | ||
| 329 | ("jr" . "$(7$](B") | ||
| 330 | ("kl" . "$(7$`(B") | ||
| 331 | ("gl" . "$(7$a(B") | ||
| 332 | ("blt" . "$(7"7%E(B") | ||
| 333 | ("bld" . "$(7"7%F(B") | ||
| 334 | ("bl" . "$(7$b(B") | ||
| 335 | ("zl" . "$(7$c(B") | ||
| 336 | ("rl" . "$(7$d(B") | ||
| 337 | ("sl" . "$(7$e(B") | ||
| 338 | ("rk" . "$(7%!(B") | ||
| 339 | ("rg" . "$(7%"(B") | ||
| 340 | ("rj" . "$(7%$(B") | ||
| 341 | ("rt" . "$(7%&(B") | ||
| 342 | ("rd" . "$(7%'(B") | ||
| 343 | ("rn" . "$(7%((B") | ||
| 344 | ("rb" . "$(7%)(B") | ||
| 345 | ("rm" . "$(7%*(B") | ||
| 346 | ("lk" . "$(7%@(B") | ||
| 347 | ("lg" . "$(7%A(B") | ||
| 348 | ("lc" . "$(7%C(B") | ||
| 349 | ("lj" . "$(7%D(B") | ||
| 350 | ("lt" . "$(7%E(B") | ||
| 351 | ("ld" . "$(7%F(B") | ||
| 352 | ("ln" . "$(7!!(B") ; dummy \x2121 | ||
| 353 | ("lp" . "$(7%G(B") | ||
| 354 | ("lb" . "$(7%H(B") | ||
| 355 | ("lh" . "$(7%I(B") | ||
| 356 | ("sk" . "$(7%P(B") | ||
| 357 | ("sg" . "$(7%Q(B") | ||
| 358 | ("st" . "$(7%T(B") | ||
| 359 | ("sd" . "$(7%U(B") | ||
| 360 | ("sn" . "$(7%V(B") | ||
| 361 | ("sp" . "$(7%W(B") | ||
| 362 | ("sb" . "$(7%X(B") | ||
| 363 | ("sm" . "$(7%Y(B"))) | ||
| 364 | |||
| 365 | (defconst tibetan-subjoined-transcription-alist | ||
| 366 | '(("+k" . "$(7#!(B") | ||
| 367 | ("+kh" . "$(7#"(B") | ||
| 368 | ("+g" . "$(7##(B") | ||
| 369 | ("+gh" . "$(7#$(B") | ||
| 370 | ("+ng" . "$(7#%(B") | ||
| 371 | ("+c" . "$(7#&(B") | ||
| 372 | ("+ch" . "$(7#'(B") | ||
| 373 | ("+j" . "$(7#((B") | ||
| 374 | ("+ny" . "$(7#*(B") | ||
| 375 | ("+T" . "$(7#+(B") | ||
| 376 | ("+TH" . "$(7#,(B") | ||
| 377 | ("+D" . "$(7#-(B") | ||
| 378 | ("+DH" . "$(7#.(B") | ||
| 379 | ("+N" . "$(7#/(B") | ||
| 380 | ("+t" . "$(7#0(B") | ||
| 381 | ("+th" . "$(7#1(B") | ||
| 382 | ("+d" . "$(7#2(B") | ||
| 383 | ("+dh" . "$(7#3(B") | ||
| 384 | ("+n" . "$(7#4(B") | ||
| 385 | ("+p" . "$(7#5(B") | ||
| 386 | ("+ph" . "$(7#6(B") | ||
| 387 | ("+b" . "$(7#7(B") | ||
| 388 | ("+bh" . "$(7#8(B") | ||
| 389 | ("+m" . "$(7#9(B") | ||
| 390 | ("+ts" . "$(7#:(B") | ||
| 391 | ("+tsh" . "$(7#;(B") | ||
| 392 | ("+dz" . "$(7#<(B") | ||
| 393 | ("+dzh" . "$(7#=(B") | ||
| 394 | ("+w" . "$(7#>(B") | ||
| 395 | ("+zh" . "$(7#?(B") | ||
| 396 | ("+z" . "$(7#@(B") | ||
| 397 | ("+'" . "$(7#A(B") | ||
| 398 | ("+y" . "$(7#B(B") | ||
| 399 | ("+r" . "$(7#C(B") | ||
| 400 | ("+l" . "$(7#D(B") | ||
| 401 | ("+sh" . "$(7#E(B") | ||
| 402 | ("+SH" . "$(7#F(B") | ||
| 403 | ("+s" . "$(7#G(B") | ||
| 404 | ("+h" . "$(7#H(B") | ||
| 405 | ("+A" . "$(7#I(B") | ||
| 406 | ("+kSH" . "$(7#J(B") | ||
| 407 | ("R" . "$(7#P(B"))) | ||
| 408 | |||
| 409 | ;;; | ||
| 410 | ;;; alist for Tibetan base consonant <-> subjoined consonant conversion. | ||
| 411 | ;;; | ||
| 412 | (defconst tibetan-base-to-subjoined-alist | ||
| 413 | '(("$(7"!(B" . "$(7#!(B") | ||
| 414 | ("$(7""(B" . "$(7#"(B") | ||
| 415 | ("$(7"#(B" . "$(7##(B") | ||
| 416 | ("$(7"$(B" . "$(7#$(B") | ||
| 417 | ("$(7"%(B" . "$(7#%(B") | ||
| 418 | ("$(7"&(B" . "$(7#&(B") | ||
| 419 | ("$(7"'(B" . "$(7#'(B") | ||
| 420 | ("$(7"((B" . "$(7#((B") | ||
| 421 | ("$(7"*(B" . "$(7#*(B") | ||
| 422 | ("$(7"+(B" . "$(7#+(B") | ||
| 423 | ("$(7",(B" . "$(7#,(B") | ||
| 424 | ("$(7"-(B" . "$(7#-(B") | ||
| 425 | ("$(7".(B" . "$(7#.(B") | ||
| 426 | ("$(7"/(B" . "$(7#/(B") | ||
| 427 | ("$(7"0(B" . "$(7#0(B") | ||
| 428 | ("$(7"1(B" . "$(7#1(B") | ||
| 429 | ("$(7"2(B" . "$(7#2(B") | ||
| 430 | ("$(7"3(B" . "$(7#3(B") | ||
| 431 | ("$(7"4(B" . "$(7#4(B") | ||
| 432 | ("$(7"5(B" . "$(7#5(B") | ||
| 433 | ("$(7"6(B" . "$(7#6(B") | ||
| 434 | ("$(7"7(B" . "$(7#7(B") | ||
| 435 | ("$(7"8(B" . "$(7#8(B") | ||
| 436 | ("$(7"9(B" . "$(7#9(B") | ||
| 437 | ("$(7":(B" . "$(7#:(B") | ||
| 438 | ("$(7";(B" . "$(7#;(B") | ||
| 439 | ("$(7"<(B" . "$(7#<(B") | ||
| 440 | ("$(7"=(B" . "$(7#=(B") | ||
| 441 | ("$(7">(B" . "$(7#>(B") | ||
| 442 | ("$(7"?(B" . "$(7#?(B") | ||
| 443 | ("$(7"@(B" . "$(7#@(B") | ||
| 444 | ("$(7"A(B" . "$(7#A(B") | ||
| 445 | ("$(7"B(B" . "$(7#B(B") | ||
| 446 | ("$(7"C(B" . "$(7#C(B") | ||
| 447 | ("$(7"D(B" . "$(7#D(B") | ||
| 448 | ("$(7"E(B" . "$(7#E(B") | ||
| 449 | ("$(7"F(B" . "$(7#F(B") | ||
| 450 | ("$(7"G(B" . "$(7#G(B") | ||
| 451 | ("$(7"H(B" . "$(7#H(B") | ||
| 452 | ("$(7"I(B" . "$(7#I(B") | ||
| 453 | ("$(7"J(B" . "$(7#J(B"))) | ||
| 454 | |||
| 455 | ;;; | ||
| 456 | ;;; alist for Tibetan consonantic components <-> precomposed glyph conversion. | ||
| 457 | ;;; (includes some punctuation conversion rules) | ||
| 458 | ;;; | ||
| 459 | (defconst tibetan-precomposition-rule-alist | ||
| 460 | '(("$(7"6#B#>(B" . "$(7$G(B") | ||
| 461 | ("$(7"##C#>(B" . "$(7$_(B") | ||
| 462 | ("$(7";#>(B" . "$(7$)(B") | ||
| 463 | ("$(7"C#:#>(B" . "$(7%.(B") | ||
| 464 | ("$(7"C###>(B" . "$(7%-(B") | ||
| 465 | ("$(7"C#!#B(B" . "$(7%0(B") | ||
| 466 | ("$(7"C###B(B" . "$(7%1(B") | ||
| 467 | ("$(7"C#9#B(B" . "$(7%2(B") | ||
| 468 | ("$(7"G#!#B(B" . "$(7%`(B") | ||
| 469 | ("$(7"G###B(B" . "$(7%a(B") | ||
| 470 | ("$(7"G#5#B(B" . "$(7%b(B") | ||
| 471 | ("$(7"G#7#B(B" . "$(7%c(B") | ||
| 472 | ("$(7"G#9#B(B" . "$(7%d(B") | ||
| 473 | ("$(7"G#!#C(B" . "$(7%p(B") | ||
| 474 | ("$(7"G###C(B" . "$(7%q(B") | ||
| 475 | ("$(7"G#4#C(B" . "$(7%r(B") | ||
| 476 | ("$(7"G#5#C(B" . "$(7%s(B") | ||
| 477 | ("$(7"G#7#C(B" . "$(7%t(B") | ||
| 478 | ("$(7"G#9#C(B" . "$(7%u(B") | ||
| 479 | ("$(7""#>(B" . "$(7$"(B") | ||
| 480 | ("$(7"*#>(B" . "$(7$%(B") | ||
| 481 | ("$(7":#>(B" . "$(7$((B") | ||
| 482 | ("$(7"?#>(B" . "$(7$*(B") | ||
| 483 | ("$(7"E#>(B" . "$(7$.(B") | ||
| 484 | ("$(7""#B(B" . "$(7$A(B") | ||
| 485 | ("$(7"6#B(B" . "$(7$D(B") | ||
| 486 | ("$(7""#C(B" . "$(7$Q(B") | ||
| 487 | ("$(7"1#C(B" . "$(7$T(B") | ||
| 488 | ("$(7"6#C(B" . "$(7$W(B") | ||
| 489 | ("$(7"E#C(B" . "$(7$Z(B") | ||
| 490 | ("$(7"<#C(B" . "$(7$^(B") | ||
| 491 | ("$(7"C#%(B" . "$(7%#(B") | ||
| 492 | ("$(7"C#*(B" . "$(7%%(B") | ||
| 493 | ("$(7"C#:(B" . "$(7%+(B") | ||
| 494 | ("$(7"C#<(B" . "$(7%,(B") | ||
| 495 | ("$(7"D#%(B" . "$(7%B(B") | ||
| 496 | ("$(7"G#%(B" . "$(7%R(B") | ||
| 497 | ("$(7"G#*(B" . "$(7%S(B") | ||
| 498 | ("$(7"G#:(B" . "$(7%Z(B") | ||
| 499 | ("$(7"!#>(B" . "$(7$!(B") | ||
| 500 | ("$(7"##>(B" . "$(7$#(B") | ||
| 501 | ("$(7"&#>(B" . "$(7$$(B") | ||
| 502 | ("$(7"0#>(B" . "$(7$&(B") | ||
| 503 | ("$(7"2#>(B" . "$(7$'(B") | ||
| 504 | ("$(7"@#>(B" . "$(7$+(B") | ||
| 505 | ("$(7"C#>(B" . "$(7$,(B") | ||
| 506 | ("$(7"D#>(B" . "$(7$-(B") | ||
| 507 | ("$(7"G#>(B" . "$(7$/(B") | ||
| 508 | ("$(7"H#>(B" . "$(7$0(B") | ||
| 509 | ("$(7"!#B(B" . "$(7$@(B") | ||
| 510 | ("$(7"##B(B" . "$(7$B(B") | ||
| 511 | ("$(7"5#B(B" . "$(7$C(B") | ||
| 512 | ("$(7"7#B(B" . "$(7$E(B") | ||
| 513 | ("$(7"9#B(B" . "$(7$F(B") | ||
| 514 | ("$(7"!#C(B" . "$(7$P(B") | ||
| 515 | ("$(7"##C(B" . "$(7$R(B") | ||
| 516 | ("$(7"0#C(B" . "$(7$S(B") | ||
| 517 | ("$(7"2#C(B" . "$(7$U(B") | ||
| 518 | ("$(7"5#C(B" . "$(7$V(B") | ||
| 519 | ("$(7"7#C(B" . "$(7$X(B") | ||
| 520 | ("$(7"9#C(B" . "$(7$Y(B") | ||
| 521 | ("$(7"G#C(B" . "$(7$[(B") | ||
| 522 | ("$(7"H#C(B" . "$(7$\(B") | ||
| 523 | ("$(7"(#C(B" . "$(7$](B") | ||
| 524 | ("$(7"!#D(B" . "$(7$`(B") | ||
| 525 | ("$(7"##D(B" . "$(7$a(B") | ||
| 526 | ("$(7"7#D(B" . "$(7$b(B") | ||
| 527 | ("$(7"@#D(B" . "$(7$c(B") | ||
| 528 | ("$(7"C#D(B" . "$(7$d(B") | ||
| 529 | ("$(7"G#D(B" . "$(7$e(B") | ||
| 530 | ("$(7"C#!(B" . "$(7%!(B") | ||
| 531 | ("$(7"C##(B" . "$(7%"(B") | ||
| 532 | ("$(7"C#((B" . "$(7%$(B") | ||
| 533 | ("$(7"C#0(B" . "$(7%&(B") | ||
| 534 | ("$(7"C#2(B" . "$(7%'(B") | ||
| 535 | ("$(7"C#4(B" . "$(7%((B") | ||
| 536 | ("$(7"C#7(B" . "$(7%)(B") | ||
| 537 | ("$(7"C#9(B" . "$(7%*(B") | ||
| 538 | ("$(7"D#!(B" . "$(7%@(B") | ||
| 539 | ("$(7"D##(B" . "$(7%A(B") | ||
| 540 | ("$(7"D#&(B" . "$(7%C(B") | ||
| 541 | ("$(7"D#((B" . "$(7%D(B") | ||
| 542 | ("$(7"D#0(B" . "$(7%E(B") | ||
| 543 | ("$(7"D#2(B" . "$(7%F(B") | ||
| 544 | ("$(7"D#5(B" . "$(7%G(B") | ||
| 545 | ("$(7"D#7(B" . "$(7%H(B") | ||
| 546 | ("$(7"D#H(B" . "$(7%I(B") | ||
| 547 | ("$(7"G#!(B" . "$(7%P(B") | ||
| 548 | ("$(7"G##(B" . "$(7%Q(B") | ||
| 549 | ("$(7"G#0(B" . "$(7%T(B") | ||
| 550 | ("$(7"G#2(B" . "$(7%U(B") | ||
| 551 | ("$(7"G#4(B" . "$(7%V(B") | ||
| 552 | ("$(7"G#5(B" . "$(7%W(B") | ||
| 553 | ("$(7"G#7(B" . "$(7%X(B") | ||
| 554 | ("$(7"G#9(B" . "$(7%Y(B") | ||
| 555 | ("$(7!=(B" . "$(8!=(B") ; 2 col <-> 1 col | ||
| 556 | ("$(7!?(B" . "$(8!?(B") | ||
| 557 | ("$(7!@(B" . "$(8!@(B") | ||
| 558 | ("$(7!A(B" . "$(8!A(B") | ||
| 559 | ("$(7"`(B" . "$(8"`(B") | ||
| 560 | ("$(7!;(B" . "$(8!;(B") | ||
| 561 | ("$(7!D(B" . "$(8!D(B") | ||
| 562 | ("$(7!>(B $(7!>(B" . "2$(7!>P(B P$(7!>1(B") ; Yes this is dirty. But ... | ||
| 563 | ("$(7!4!5!5(B" . "2$(7#RP#SP#SP#S1(B") | ||
| 564 | ("$(7!4!5(B" . "2$(7#RP#SP#S1(B") | ||
| 565 | ("$(7!6(B" . "2$(7#RP#S_!I1(B") | ||
| 566 | ("$(7!4(B" . "2$(7#RP#S1(B"))) | ||
| 567 | |||
| 568 | (defvar tibetan-regexp | ||
| 569 | (let ((l (append tibetan-consonant-transcription-alist | ||
| 570 | tibetan-vowel-transcription-alist | ||
| 571 | tibetan-subjoined-transcription-alist)) | ||
| 572 | temp) | ||
| 573 | (setq temp "\\(") | ||
| 574 | (setq temp (concat temp (car (car l)))) | ||
| 575 | (setq l (cdr l)) | ||
| 576 | (while l | ||
| 577 | (setq temp (concat temp "\\|" (car (car l)))) | ||
| 578 | (setq l (cdr l))) | ||
| 579 | (concat temp "\\)$")) | ||
| 580 | "Regexp string to match a romanized Tibetan character component, i.e., | ||
| 581 | base and subjoined consonant, vowel and vowel modifier. The result of matching | ||
| 582 | is to be used for indexing alists at conversion from a roman transcription to | ||
| 583 | the corresponding Tibetan character.") | ||
| 584 | |||
| 585 | (defvar tibetan-precomposed-regexp | ||
| 586 | (let ((l tibetan-precomposed-transcription-alist) | ||
| 587 | temp) | ||
| 588 | (setq temp "^\\(") | ||
| 589 | (setq temp | ||
| 590 | (concat temp (car (car l)))) | ||
| 591 | (setq l (cdr l)) | ||
| 592 | (while l | ||
| 593 | (setq temp | ||
| 594 | (concat temp "\\|" (car (car l)))) | ||
| 595 | (setq l (cdr l))) | ||
| 596 | (concat temp "\\)")) | ||
| 597 | "Regexp string to match a romanized Tibetan complex consonant. | ||
| 598 | The result of matching is to be used for indexing alists when the input key | ||
| 599 | from an input method is converted to the corresponding precomposed glyph.") | ||
| 600 | |||
| 601 | (defvar tibetan-precomposition-rule-regexp | ||
| 602 | (let ((l tibetan-precomposition-rule-alist) | ||
| 603 | temp) | ||
| 604 | (setq temp "\\(") | ||
| 605 | (setq temp (concat temp (car (car l)))) | ||
| 606 | (setq l (cdr l)) | ||
| 607 | (while l | ||
| 608 | (setq temp (concat temp "\\|" (car (car l)))) | ||
| 609 | (setq l (cdr l))) | ||
| 610 | (concat temp "\\)")) | ||
| 611 | "Regexp string to match a sequence of Tibetan consonantic components, i.e., | ||
| 612 | one base consonant and one or more subjoined consonants. | ||
| 613 | The result of matching is to be used for indexing alist when the component | ||
| 614 | sequence is converted to the corresponding precomposed glyph. | ||
| 615 | This also matches some punctuation characters which need conversion.") | ||
| 616 | |||
| 617 | (defvar tibetan-decomposed nil) | ||
| 618 | (defvar tibetan-decomposed-temp nil) | ||
| 619 | |||
| 620 | ;;; language/tibetan.el ends here | ||