ipa.el 20 KB

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