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