("kirshenbaum-ipa", "x-sampa-ipa"):
[bpt/emacs.git] / leim / quail / ipa.el
CommitLineData
1f272ae8 1;;; ipa.el --- Quail package for inputting IPA characters -*-coding: utf-8;-*-
24b31c88 2
03ba6797 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
76c02cbb 4;; 2006, 2007, 2008, 2009
698218a2
KH
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
08166ed6
JL
7;; Licensed to the Free Software Foundation.
8;; Copyright (C) 2009 Free Software Foundation, Inc.
24b31c88
KH
9
10;; Keywords: multilingual, input method, IPA
11
12;; This file is part of GNU Emacs.
13
3d544458 14;; GNU Emacs is free software: you can redistribute it and/or modify
24b31c88 15;; it under the terms of the GNU General Public License as published by
3d544458
GM
16;; the Free Software Foundation, either version 3 of the License, or
17;; (at your option) any later version.
24b31c88
KH
18
19;; GNU Emacs is distributed in the hope that it will be useful,
20;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;; GNU General Public License for more details.
23
24;; You should have received a copy of the GNU General Public License
3d544458 25;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24b31c88 26
be567141
PJ
27;;; Commentary:
28
24b31c88
KH
29;;; Code:
30
31(require 'quail)
08166ed6 32(eval-when-compile (require 'cl))
24b31c88
KH
33
34(quail-define-package
35 "ipa" "IPA" "IPA" t
36 "International Phonetic Alphabet for English, French, German and Italian
37
38Upside-down characters are obtained by a preceding slash (/)."
f10f03e8 39 nil t nil nil nil nil nil nil nil nil t)
24b31c88
KH
40
41(quail-define-rules
1f272ae8
JL
42 ("i" ?i)
43 ("I" ?ɪ)
44 ("e" ?e)
45 ("/3" ?ɛ)
46 ("E" ?ɛ)
47 ("ae" ?æ)
48 ("a" ?a)
49 ("i-" ?ɨ)
50 ("/e" ?ə)
51 ("/a" ?ɐ)
52 ("/m" ?ɯ)
53 ("&" ?ɤ)
54 ("/v" ?ʌ)
55 ("A" ?ɑ)
56 ("o|" ?ɑ)
57 ("y" ?y)
58 ("Y" ?ʏ)
59 ("o/" ?ø)
60 ("oe" ?œ)
61 ("OE" ?ɶ)
62 ("u-" ?ʉ)
63 ("o-" ?ɵ)
64 ("u" ?u)
65 ("U" ?ʊ)
66 ("o" ?o)
67 ("/c" ?ɔ)
68 ("/A" ?ɒ)
69 ("|o" ?ɒ)
70 ("e-" ?ɚ)
71 ("e|" ?ɚ)
72 ("/3~" ["ɛ̃"])
73 ("E~" ["ɛ̃"])
74 ("A~" ["ɑ̃"])
75 ("oe~" ["œ̃"])
76 ("/c~" ["ɔ̃"])
77 ("p" ?p)
78 ("b" ?b)
79 ("t" ?t)
80 ("d" ?d)
81 ("k" ?k)
82 ("g" ?g)
83 ("f" ?f)
84 ("v" ?v)
85 ("th" ?θ)
86 ("dh" ?ð)
87 ("s" ?s)
88 ("z" ?z)
89 ("sh" ?ʃ)
90 ("zh" ?ʒ)
91 ("3" ?ʒ)
92 ("c," ?ç)
93 ("x" ?x)
94 ("/R" ?ʁ)
95 ("h" ?h)
96 ("m" ?m)
97 ("n" ?n)
98 ("gn" ?ɲ)
99 ("ng" ?ŋ)
100 ("r" ?r)
101 ("R" ?ʀ)
102 ("/r" ?ɹ)
103 ("j" ?j)
104 ("l" ?l)
105 ("/y" ?ʎ)
106 ("L" ?ʟ)
107 ("/h" ?ɥ)
108 ("w" ?w)
109 ("M" ?ʍ)
110 ("'" ?ˈ)
111 ("`" ?ˌ)
112 (":" ?ː))
be567141 113
08166ed6
JL
114(quail-define-package
115 "kirshenbaum-ipa" "IPA" "IPA-K" t
116 "The International Phonetic Alphabet, using Kirshenbaum ASCII translit.
117
118Kirshenbaum IPA is an ASCII transliteration of the phonetic alphabet, common
119in the Usenet groups `sci.lang' and `alt.usage.english'. This input method
120allows you to type Kirshenbaum on your ASCII-capable keyboard, producing the
121corresponding actual IPA characters in your editor.
122
123See http://www.kirshenbaum.net/IPA/ascii-ipa.pdf for full details of the
124transliteration.
125
126A caveat with regard to that document; while XEmacs currently preserves
127Unicode diacritics on reading and emitting them, it displays them,
128incorrectly, as separate from the modified glyphs.")
129
130(quail-define-rules
131 ("r" "ɹ") ;; Alveolar approximant U+0279
132 ("A" "ɑ") ;; Low back unrounded vowel U+0251
133 ("B" "β") ;; Voiced bilabial fricative U+03B2
134 ("C" "ç") ;; Voiced palatal fricative U+00E7
135 ("D" "ð") ;; Voiced dental fricative U+00F0
136 ("E" "ɛ") ;; Lower-mid front unrounded vowel U+025B
137 ("G" "ɢ") ;; Voiced uvular stop U+0262
138 ("H" "ħ") ;; Voiced pharyngeal fricative U+0127
139 ("I" "ɪ") ;; Semi-high front unrounded vowel U+026A
140 ("J" "ɟ") ;; Voiced palatal stop U+025F
141 ("L" ["ɫ" ;; Voiced velar lateral U+026B
142 "ʟ" ;; Voiced velar lateral U+029F
143 "ɬ"]) ;; Voiced alveolar lateral fricative U+026C
144 ("M" "ɱ") ;; Labio-dental nasal U+0271
145 ("N" "ŋ") ;; Velar nasal U+014B
146 ("O" "ɔ") ;; Low-mid back rounded vowel U+0254
147 ("P" "ɸ") ;; Voiceless bilabial fricative U+0278
148 ("Q" "ɣ") ;; Voiced velar fricative U+0263
149 ("R" ["ʀ" ;; Alveolar trill U+0280
150 "ɚ"]) ;; Rhotacised schwa U+025A
151 ("@<r>" "ɚ") ;; Mid central rhotacised vowel U+025A
152 ("S" "ʃ") ;; Voiced postalveolar fricative U+0283
153 ("T" "θ") ;; Voiced dental fricative U+03B8
154 ("U" "ʊ") ;; Semi-high back rounded vowel U+028A
155 ("V" "ʌ") ;; Low-mid back unrounded vowel U+028C
156 ("W" "œ") ;; Low-mid front rounded vowel U+0153
157 ("X" "χ") ;; Voiceless uvular fricative U+03C7
158 ("Y" "ø") ;; Upper-mid front rounded vowel U+00F8
159 ("Z" "ʒ") ;; Voiced postalveolar fricative U+0292
160 ("?" "ʔ") ;; Glottal stop U+0294
161 ("@" "ə") ;; Mid central unrounded vowel (schwa) U+0259
162 ("&" "æ") ;; Low front unrounded vowel U+00E6
163 ("*" "ɾ") ;; Voiced alveolar flap U+027E
164
165 ("a~" "ã") ;; Low central unrounded vowel, nasal U+00E3
166 ("o~" "õ") ;; Upper-mid back rounded vowel, nasal U+00F5
167 ("u~" "ũ") ;; High back rounded vowel, nasal U+0169
168 ("~" "̃") ;; +Nasalised modifier U+0303
169 (":" "ː") ;; +Long modifier U+02D0
170 ("-" "̩") ;; +Syllabic modifier U+0329
171 ("." "̣") ;; +Retroflex modifier U+0323
172 ("`" "ʼ") ;; +Ejective modifier U+02BC
173 ("[" "̪") ;; +Dental modifier U+032A
174 (";" "ʲ") ;; +Palatalised modifier U+02B2
175 ("<H>" "̴") ;; +Pharyngealised modifier U+0334
176 ("<h>" "ʰ") ;; +Aspirated modifier U+02B0
177 ("<o>" ["̥" ;; +Voiceless modifier U+0325
178 "˚"]) ;; +Unexploded modifier U+02DA
179 ("<r>" "ʳ") ;; +Rhotacised modifier U+02B3
180 ("<w>" "ʷ") ;; +Labialised modifier U+02B7
181 ("<?>" "ʱ") ;; +Murmured modififer U+02B1
182
183 ("b<trl>" "ʙ") ;; Bilabial trill U+0299
184 ("b`" "ɓ") ;; Bilabial implosive U+0253
185 ("p!" "ʘ") ;; Bilabial click U+0298
186 ("r<lbd>" "ʋ") ;; Labio-dental approximant U+028B
187 ("d`" "ɗ") ;; Dental implosive U+0257
188 ("t!" "ʇ") ;; Dental click U+0287
189 ("s<lat>" "ɬ") ;; Voiceless alveolar lateral fricative U+026C
190 ("z<lat>" "ɮ") ;; Voiced alveolar lateral fricative U+026E
191 ("r<trl>" "ʀ") ;; Alveolar trill U+0280
192
193 ("*<lat>" "ɺ") ;; Voiced alveolar lateral flap U+027A
194 ("c!" "ʗ") ;; Alveolar click U+0297
195 ("l!" "ʖ") ;; Alveolar lateral click U+0296
196 ("n." "ɳ") ;; Retroflex nasal U+0273
197 ("t." "ʈ") ;; Voiceless retroflex stop U+0288
198 ("d." "ɖ") ;; Voiced retroflex stop U+0256
199 ("s." "ʂ") ;; Voiceless retroflex fricative U+0282
200 ("z." "ʐ") ;; Voiceless retroflex fricative U+0290
201 ("r." "ɻ") ;; Retroflex approximant U+027B
202 ("l." "ɭ") ;; Retroflex lateral U+026D
203 ("*." "ɽ") ;; Retroflex flap U+027D
204
205 ("C<vcd>" "ʝ") ;; Voiced palatal fricative U+029D
206 ("j<rnd>" "ɥ") ;; Rounded palatal approximant U+0265
207 ("l^" "ʎ") ;; Palatal lateral U+028E
208 ("J`" "ʄ") ;; Palatal implosive U+0284
209 ("j<vel>" "ɰ") ;; Velar approximant U+0270
210 ("g`" "ɠ") ;; Velar implosive U+0260
211 ("k!" "ʞ") ;; Velar click U+029E
212
213 ("n<lbv>" ["n⁀g"]) ;; Labio-velar nasal
214 ("t<lbv>" ["k⁀p"]) ;; Voiceless labio-velar stop
215
216 ;; "n<lbv> for "gb" WITH U+2030 CHARACTER TIE was ambiguous and
217 ;; misleading. I _believe_ this is what was meant instead.
218 ("d<lbv>" ["g⁀b"]) ;; Voiced labio-velar stop.
219
220 ("w<vls>" "ʍ") ;; Voiceless labio-velar stop U+028D
221 ("n\"" "ɴ") ;; Uvular nasal U+0274
222 ("g\"" "ʁ") ;; Voiced uvular fricative U+0281
223 ("r\"" "ʀ") ;; Uvular trill U+0280
224 ("G`" "ʛ") ;; Voiced uvular implosive U+029B
225 ("H<vcd>" "ʕ") ;; Voiced pharyngeal fricative U+0295
226
227 ("h<?>" "ɦ") ;; Murmured glottal fricative U+0266
228 ("I." "ʏ") ;; Semi-high front rounded vowel U+028F
229 ("&." "ɶ") ;; Low front unrounded vowel U+0276
230
231 ("i\"" "ɨ") ;; High central unrounded vowel U+0268
232 ("u\"" "ʉ") ;; High central rounded vowel U+0289
233 ("@<umd>" "ɘ") ;; Upper-mid central unrounded vowel U+0258
234
235 ("R<umd>" "ɝ") ;; Upper-mid central rhotacised vowel U+025D
236
237 ("@." "ɵ") ;; Mid central rounded vowel U+0275
238 ("V\"" "ɜ") ;; Lower-mid central unrounded vowel U+025C
239 ("O\"" "ɞ") ;; Lower-mid central rounded vowel U+025E
240 ("u-" "ɯ") ;; High back unrounded vowel U+026F
241 ("o-" "ɤ") ;; Upper-mid back unrounded vowel U+0264
242 ("A." "ɒ")) ;; Lower back rounded vowel U+0252
243
244;; On XEmacs, with the supplied X-SAMPA data, this function is capably
245;; implemented with:
246;;
247;; (list (vector (concat to-prepend quail-keymap)))
248;;
249;; Supporting GNU Emacs too makes it a good deal more complicated.
250
251(defun x-sampa-prepend-to-keymap-entry (to-prepend quail-keymap)
252 "Return QUAIL-KEYMAP with TO-PREPEND at the beginning of each result.
253
254QUAIL-KEYMAP is a cons that satisfies `quail-map-p'; TO-PREPEND is a
255string."
256 (when (consp quail-keymap) (setq quail-keymap (cdr quail-keymap)))
257 (if (or (integerp quail-keymap)
258 (and (fboundp 'characterp) (characterp quail-keymap)))
259 (setq quail-keymap (list (string quail-keymap)))
260 (if (stringp quail-keymap)
261 (setq quail-keymap (list quail-keymap))
262 (assert (vectorp quail-keymap) t)
263 (setq quail-keymap (append quail-keymap nil))))
264 (list
265 (apply 'vector
266 (mapcar
267 #'(lambda (entry)
268 (assert (char-or-string-p entry) t)
269 (format "%s%s" to-prepend
270 (if (integerp entry) (string entry) entry)))
271 quail-keymap))))
272
273(defun x-sampa-underscore-implosive (input-string length)
274 "Return keymap with IPA implosives, for INPUT-STRING, length LENGTH.
275
276The implosive consonants in X-SAMPA are represented with more or less a
277diacritic syntax, but the property +implosive in the IPA is expressed using
278separate characters, and not using a diacritic. This function works around
279the confusion that implies when generating IPA from X-SAMPA; it returns a
280Quail map that is a copy of the map for `_', but with all the DIACRITIC
281entries changed to return the diacritic together with the base character,
282and with the map to the implosive added to its end.
283
284Like all `quail-defrule'-assigned functions, this will be called once for
285each particular sequence of keys, the first time the user types that
286particular sequence of keys, and the result will be cached by Quail."
287 (let* ((input-string (substring input-string 0 (or length)))
288 (underscore-map (copy-tree (quail-lookup-key "_")))
289 (split-input (split-string input-string "_"))
290 (pre-underscore (car split-input))
291 (pre-underscore-map (quail-lookup-key pre-underscore))
292 (x-sampa-submap-entry
293 (assoc (format "%s<" input-string) x-sampa-implosive-submap))
294 underscore-map-entry)
295 (if (and (consp pre-underscore-map) (car pre-underscore-map))
296 (setq pre-underscore-map (car pre-underscore-map))
297 (setq pre-underscore-map pre-underscore))
298 (unless (stringp pre-underscore-map)
299 (setq pre-underscore-map (string pre-underscore-map)))
300 (dolist (underscoring underscore-map)
301 (cond ((null underscoring))
302 ((eq (length underscoring) 2)
303 (setq underscore-map-entry (second underscoring))
304 (setcdr underscoring (x-sampa-prepend-to-keymap-entry
305 pre-underscore-map underscore-map-entry)))
306 ((eq (length underscoring) 3)
307 (setq underscore-map-entry (second (third underscoring)))
308 (setcdr (third underscoring)
309 (x-sampa-prepend-to-keymap-entry
310 pre-underscore-map underscore-map-entry)))
311 (t
312 (assert (null t) t
313 "Can't handle subtrees of this level right now."))))
314 (append underscore-map (list (list ?< (second x-sampa-submap-entry))))))
315
316(quail-define-package
317 "x-sampa-ipa" "IPA" "IPA-X" t
318 "The International Phonetic Alphabet, using J.C. Wells' X-SAMPA.
319
320X-SAMPA is an ASCII transliteration of the IPA, normally used for data
321exchange in environments where Unicode is not available. This input method
322uses this transliteration to allow you to produce the IPA in your editor
323with a keyboard that's limited to ASCII.
324
325See http://www.phon.ucl.ac.uk/home/sampa/ipasam-x.pdf for a full definition
326of the mapping. A caveat with regard to that document; while XEmacs
327currently preserves Unicode diacritics on reading and emitting them, it
328displays them, incorrectly, as separate from the modified glyphs." nil t t)
329
330(quail-define-rules
331 ;; Table taken from http://en.wikipedia.org/wiki/X-SAMPA, checked with
332 ;; http://www.phon.ucl.ac.uk/home/sampa/ipasam-x.pdf
333
334 ("d`" "ɖ") ;; Voiced retroflex plosive U+0256
335
336 ;; In the Wikipedia article, they list ASCII g as mapping to U+0261, LATIN
337 ;; SMALL LETTER SCRIPT G. The typeset g is equally acceptable as the voiced
338 ;; velar plosive, however, and we don't override the identity mapping here.
339
340 ("h\\" "ɦ") ;; Voiced glottal fricative U+0266
341 ("j\\" "ʝ") ;; Voiced palatal fricative U+029D
342 ("l`" "ɭ") ;; Retroflex lateral approximant U+026D
343 ("l\\" "ɺ") ;; Alveolar lateral flap U+027A
344 ("n`" "ɳ") ;; Retroflex nasal U+0273
345 ("p\\" "ɸ") ;; Voiceless bilabial fricative U+0278
346 ("r`" "ɽ") ;; Retroflex flap U+027D
347 ("r\\" "ɹ") ;; Alveolar approximant U+0279
348 ("r\\`" "ɻ") ;; Retroflex approximant U+027B
349 ("s`" "ʂ") ;; Voiceless retroflex fricative U+0282
350 ("s\\" "ɕ") ;; Voiceless alveolo-palatal fricative U+0255
351 ("t`" "ʈ") ;; Voiceless retroflex plosive U+0288
352 ("v\\" "ʋ") ;; Labiodental approximant U+028B
353 ("x\\" "ɧ") ;; Voiceless palatal-velar fricative U+0267
354 ("z`" "ʐ") ;; Voiced retroflex fricative U+0290
355 ("z\\" "ʑ") ;; Voiced alveolo-palatal fricative U+0291
356 ("A" "ɑ") ;; Open back unrounded vowel U+0251
357 ("B" "β") ;; Voiced bilabial fricative U+03B2
358 ("B\\" "ʙ") ;; Bilabial trill U+0299
359 ("C" "ç") ;; Voiceless palatal fricative U+00E7
360 ("D" "ð") ;; Voiced dental fricative U+00F0
361 ("E" "ɛ") ;; Open-mid front unrounded vowel U+025B
362 ("F" "ɱ") ;; Labiodental nasal U+0271
363 ("G" "ɣ") ;; Voiced velar fricative U+0263
364 ("G\\" "ɢ") ;; Voiced uvular plosive U+0262
365 ("H" "ɥ") ;; Labial-palatal approximant U+0265
366 ("H\\" "ʜ") ;; Voiceless epiglottal fricative U+029C
367 ("I" "ɪ") ;; Near-close near-front unrounded vowel U+026A
368 ("I\\" "Ɨ") ;; Central lax close unrounded vowel U+0197
369 ("J" "ɲ") ;; Palatal nasal U+0272
370 ("J\\" "ɟ") ;; Voiceless palatal plosive U+025F
371 ("K" "ɬ") ;; Voiceless alveolar lateral fricative U+026C
372 ("K\\" "ɮ") ;; Voiced alveolar lateral fricative U+026E
373 ("L" "ʎ") ;; Palatal lateral approximant U+028E
374 ("L\\" "ʟ") ;; Velar lateral approximant U+029F
375 ("M" "ɯ") ;; Close back unrounded vowel U+026F
376 ("M\\" "ɰ") ;; Velar approximant U+0270
377 ("N" "ŋ") ;; Velar nasal U+014B
378 ("N\\" "ɴ") ;; Uvular nasal U+0274
379 ("O" "ɔ") ;; Open-mid back rounded vowel U+0254
380 ("O\\" "ʘ") ;; Bilabial click U+0298
381 ("P" "ʋ") ;; Labiodental approximant U+028B
382 ("Q" "ɒ") ;; Open back rounded vowel U+0252
383 ("R" "ʁ") ;; Voiced uvular fricative U+0281
384 ("R\\" "ʀ") ;; Uvular trill U+0280
385 ("S" "ʃ") ;; Voiceless postalveolar fricative U+0283
386 ("T" "θ") ;; Voiceless dental fricative U+03B8
387 ("U" "ʊ") ;; Near-close near-back rounded vowel U+028A
388 ("U\\" ["ʊ̵"]) ;; Central lax close rounded vowel, U+028A U+0335
389 ("V" "ʌ") ;; Open-mid back unrounded vowel U+028C
390 ("W" "ʍ") ;; Voiceless labial-velar fricative U+028D
391 ("X" "χ") ;; Voiceless uvular fricative U+03C7
392 ("X\\" "ħ") ;; Voiceless pharyngeal fricative U+0127
393 ("Y" "ʏ") ;; Near-close near-front rounded vowel U+028F
394 ("Z" "ʒ") ;; Voiced postalveolar fricative U+0292
395
396 ("\"" "ˈ") ;; Primary stress U+02C8
397 ("%" "ˌ") ;; Secondary stress U+02CC
398 (":" "ː") ;; Long U+02D0
399 (":\\" "ˑ") ;; Half-long U+02D1
400 ("@" "ə") ;; Schwa U+0259
401 ("@\\" "ɘ") ;; Close-mid central unrounded vowel U+0258
402 ("@`" "ɚ") ;; Rhotacised schwa U+025A
403 ("{" "æ") ;; Near-open front unrounded vowel U+00E6
404 ("}" "ʉ") ;; Close central rounded vowel U+0289
405 ("1" "ɨ") ;; Close central unrounded vowel U+0268
406 ("2" "ø") ;; Close-mid front rounded vowel U+00F8
407 ("3" "ɜ") ;; Open-mid central unrounded vowel U+025C
408 ("3\\" "ɞ") ;; Open-mid central rounded vowel U+025E
409 ("4" "ɾ") ;; Alveolar flap U+027E
410 ("5" "ɫ") ;; Velarised alveolar lateral approximant U+026B
411 ("6" "ɐ") ;; Near-open central vowel U+0250
412 ("7" "ɤ") ;; Close-mid back unrounded vowel U+0264
413 ("8" "ɵ") ;; Close-mid central rounded vowel U+0275
414 ("9" "œ") ;; Open-mid front rounded vowel U+0153
415 ("&" "ɶ") ;; Open front rounded vowel U+0276
416 ("?" "ʔ") ;; Glottal stop U+0294
417 ("?\\" "ʕ") ;; Voiced pharyngeal fricative U+0295
418 ;; The undefined escape character, ignored.
419 ;; Indeterminacy in French vowels, ignored.
420 ;; Begin nonsegmental notation, ignored.
421 ("<\\" "ʢ") ;; Voiced epiglottal fricative U+02A2
422 ;; End nonsegmental notation, ignored.
423 (">\\" "ʡ") ;; Epiglottal plosive U+02A1
424 ("^" "↑") ;; Upstep U+2191
425 ("!" "↓") ;; Downstep U+2193
426 ("!\\" "ǃ") ;; Postalveolal click U+01C3
427 ("\\" "ǀ") ;; Dental click U+01C0
428 ("\\|\\" "ǁ") ;; Lateral alveolar click U+01C1
429 ("=\\" "ǂ") ;; Palatal click U+01C2
430 ("-\\" "̮") ;; Linking mark U+032E
431
432 ;; Diacritics. Note that XEmacs doesn't yet have composed characters, so we
433 ;; can input them, but they won't display properly. If you send email using
434 ;; them, and the recipient's client is capable, they will get through,
435 ;; though.
436
437 ("_\"" "̈") ;; Centralised U+0308
438 ("_+" "̟") ;; Advanced U+031F
439 ("_-" "̠") ;; Retracted U+0320
440 ("_/" "ˇ") ;; Rising tone U+02C7
441 ("_0" "̥") ;; Voiceless U+0325
442 ("_=" "̩") ;; Syllabic U+0329
443 ("=" "̩") ;; Syllabic U+0329
444 ("_>" "ʼ") ;; Ejective U+02BC
445 ("_?\\" "ˤ") ;; Pharyngealised U+02E4
446 ("_\\" "ˆ") ;; Falling Tone U+02C6
447 ("_^" "̯") ;; Non-syllabic U+032F
448 ("_}" "̚") ;; No audible release U+031A
449 ;; ` is alternatively; retroflexion in consonants
450 ("`" "˞") ;; Rhotacization in vowels U+02DE
451 ("_~" "̃") ;; Nasalisation U+0303
452 ("~" "̃") ;; Nasalisation U+0303
453 ("_A" "̘") ;; Advanced tongue root U+0318
454 ("_a" "̺") ;; Apical U+033A
455 ("_B" "̏") ;; Extra low tone U+030F
456 ;; _B_L omitted, no Unicode code point for "low rising tone."
457 ("_c" "̜") ;; Less rounded U+031C
458 ("_d" "̪") ;; Dental U+032A
459 ("_e" "̴") ;; Velarised or pharyngeal U+0334
460
461 ("<F>" "↙") ;; Global fall; SOUTH EAST ARROW; may be a bit smaller than
462 ;; intended.
463 ("_F" "̂") ;; Falling tone U+0302
464 ("_G" "ˠ") ;; Velarised U+02E0
465 ("_H" "́") ;; High tone U+0301
466 ;; "_H_T omitted, no Unicode code point for "high rising tone"
467 ("_h" "ʰ") ;; Aspirated U+02B0
468 ("_j" "ʲ") ;; Palatalised U+02B2
469 ("'" "ʲ") ;; Palatalised U+02B2
470 ("_k" "̰") ;; Creaky voice U+0330
471 ("_L" "̀") ;; Low tone U+0300
472 ("_l" "ˡ") ;; Lateral release U+02E1
473 ("_M" "̄") ;; Mid tone U+0304
474 ("_m" "̻") ;; Laminal U+033B
475 ("_N" "̼") ;; Linguolabial U+033C
476 ("_n" "ⁿ") ;; Nasal release U+207F
477 ("_O" "̹") ;; More rounded U+0339
478 ("_o" "̞") ;; Lowered U+031E
479 ("_q" "̙") ;; Retracted tongue root U+0319
480 ("<R>" "↗") ;; NORTH EAST ARROW; may be a bit smaller than intended.
481 ("_R" "̌") ;; Haček, caron, rising tone. U+030C
482 ;; _R_F omitted, apparently there's no corresponding Unicode entry.
483 ("_r" "̝") ;; Raised U+031D
484 ("_T" "̋") ;; Extra high tone U+030B
485 ("_t" "̤") ;; Breathy voice U+0324
486 ("_v" "̬") ;; Voiced U+032C
487 ("_w" "ʷ") ;; Labialised U+02B7
488 ("_X" "̆") ;; Extra-short U+0306
489 ("_x" "̽")) ;; Mid-centralised U+033D
490
491(defconst x-sampa-implosive-submap
492 '(("b_<" ?ɓ) ;; Voiced bilabial implosive U+0253
493 ("d_<" ?ɗ) ;; Voiced alveolar implosive U+0257
494 ("g_<" ?ɠ) ;; Voiced velar implosive U+0260
495 ("G\\_<" ?ʛ) ;; Voiced uvular implosive U+029B
496 ("J\\_<" ?ʄ)) ;; Voiced palatal implosive U+0284
497 "A map from the X-SAMPA for some implosive consonants to characters.
498This is used because their X-SAMPA syntax is quasi-diacritic, but the
499corresponding Unicode characters themselves don't have diacritics, they are
500separate code points. So we need to implement some extra logic that isn't
501normally provided by Quail.")
502
503;; Putting in place rules for the implosives like for the others above
504;; breaks the "_<diacritic>" rules for b, d, g, G and J a little--you need
505;; to interrupt Quail before typing the underscore if you want the
506;; diacritic. To avoid this, handle the input specially with the function
507;; x-sampa-underscore-implosive.
508
509(dolist (implosive-x-sampa (mapcar 'car x-sampa-implosive-submap))
510 (setq implosive-x-sampa (car (split-string implosive-x-sampa "_")))
511 (quail-defrule (format "%s_" implosive-x-sampa)
512 'x-sampa-underscore-implosive))
513
3d544458 514;; arch-tag: cf2614cc-ecce-4ef5-ba51-37faeed41691
be567141 515;;; ipa.el ends here