From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aidan Kehoe Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#1750: [PATCH] Support standard ASCII-IPA mappings in leim/quail/ipa.el. Date: Wed, 31 Dec 2008 13:41:40 +0000 Message-ID: <18779.30356.834146.410474@parhasard.net> Reply-To: Aidan Kehoe , 1750@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="wNNNfbStpN" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1230732315 23497 80.91.229.12 (31 Dec 2008 14:05:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2008 14:05:15 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 31 15:06:19 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LI1hm-0005KI-MJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Dec 2008 15:05:57 +0100 Original-Received: from localhost ([127.0.0.1]:59213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LI1gY-0004YG-JN for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Dec 2008 09:04:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LI1fU-0004Ib-O2 for bug-gnu-emacs@gnu.org; Wed, 31 Dec 2008 09:03:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LI1fR-0004IO-MD for bug-gnu-emacs@gnu.org; Wed, 31 Dec 2008 09:03:28 -0500 Original-Received: from [199.232.76.173] (port=34248 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LI1fR-0004IL-HU for bug-gnu-emacs@gnu.org; Wed, 31 Dec 2008 09:03:25 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34346) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LI1fQ-0000wz-8p for bug-gnu-emacs@gnu.org; Wed, 31 Dec 2008 09:03:25 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBVE3Msx012919; Wed, 31 Dec 2008 06:03:22 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBVDo3TI009378; Wed, 31 Dec 2008 05:50:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Aidan Kehoe Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 31 Dec 2008 13:50:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 1750 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12307309068074 (code B ref -1); Wed, 31 Dec 2008 13:50:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 31 Dec 2008 13:41:46 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBVDfca4008068 for ; Wed, 31 Dec 2008 05:41:40 -0800 Original-Received: from mx10.gnu.org ([199.232.76.166]:38158) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LI1JI-0000eW-SC for emacs-pretest-bug@gnu.org; Wed, 31 Dec 2008 08:40:33 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LI1KF-0006mU-1c for emacs-pretest-bug@gnu.org; Wed, 31 Dec 2008 08:41:35 -0500 Original-Received: from daedalus.ipv4.asclepian.ie ([213.133.100.226]:56357 helo=daedalus.asclepian.ie) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LI1KE-0006ls-09 for emacs-pretest-bug@gnu.org; Wed, 31 Dec 2008 08:41:30 -0500 Original-Received: by daedalus.asclepian.ie (Postfix, from userid 1002) id 22A10B82D; Wed, 31 Dec 2008 13:41:45 +0000 (GMT) X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta28) "fuki" 69a1eda3da06+ XEmacs Lucid (i386-apple-darwin8.11.1) X-NS5-file-as-sent: t X-Echelon-distraction: militia colonel Waco, Texas Marxist Vince Foster Legion of Doom X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 31 Dec 2008 09:03:28 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23612 gmane.emacs.pretest.bugs:23582 Archived-At: --wNNNfbStpN Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit I was asked to resend this after the release; see http://mid.gmane.org/17834.14174.503231.877601@parhasard.net and http://thread.gmane.org/gmane.emacs.pretest.bugs/16625 for the associated thread. --wNNNfbStpN Content-Type: message/rfc822 Content-Description: forwarded message Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on icarus.asclepian.ie X-Spam-Level: X-Spam-Status: No, score=-2.0 required=4.7 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Original-To: aidan@icarus.conall.net Delivered-To: aidan@icarus.conall.net Received: by icarus.asclepian.ie (Postfix, from userid 1003) id 841338008C; Sun, 14 Jan 2007 13:56:56 +0000 (GMT) Message-ID: <17834.14174.503231.877601@parhasard.net> X-NS5-file-as-sent: t X-Generated-By: Patcher version 3.8 From: Aidan Kehoe To: emacs-pretest-bug@gnu.org Subject: [PATCH] Support standard ASCII-IPA mappings in leim/quail/ipa.el. Date: Sun, 14 Jan 2007 14:59:58 +0100 Content-Transfer-Encoding: quoted-printable There are two widely-used mappings from ASCII to the International Phonet= ic Alphabet used on Usenet and in the online linguistics community generally. The extant ipa.el uses its own convention to map from ASCII to the IPA; this patch addes support for the more-widely used ones to it, wi= th two new input methods, kirshenbaum-ipa and x-sampa-ipa, following the nam= es of the two conventions. It also moves the file encoding to UTF-8, since Kirshenbaum and X-SAMPA require more character codes than are provided by the Mule IPA character set, and since UTF-8 is more compatible with other applications.=20 In the event that my mailer or yours trashes the character encoding of th= e patch, I=E2=80=99ve made a bzip2=E2=80=99d version of the full file avail= able at http://www.parhasard.net/ipa-20070114.el.bz2 .=20 leim/ChangeLog addition: 2007-01-14 Aidan Kehoe * quail/ipa.el: Recode the file as UTF-8, for better interoperability with other applications.=20 * quail/ipa.el ("kirshenbaum-ipa"): * quail/ipa.el ("x-sampa-ipa"): * quail/ipa.el (x-sampa-prepend-to-keymap-entry): New function. * quail/ipa.el (x-sampa-implosive-submap): New Quail submap. * quail/ipa.el (x-sampa-underscore-implosive): New function. Two new input methods, both following widely-used Usenet conventions for mapping ASCII to the IPA. Kirshenbaum is common in sci.lang and alt.usage.english, X-SAMPA in various (mostly European) non-English language fora. X-SAMPA is slightly more complex to support in Quail that Kirshenbaum, whence the two extra function and one extra submap to support it.=20 GNU Emacs Trunk source patch: Diff command: cvs -q diff -Nu Files affected: leim/quail/ipa.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS Index: leim/quail/ipa.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/leim/quail/ipa.el,v retrieving revision 1.8 diff -u -u -r1.8 ipa.el --- leim/quail/ipa.el 13 Dec 2006 01:13:56 -0000 1.8 +++ leim/quail/ipa.el 14 Jan 2007 13:41:57 -0000 @@ -1,8 +1,10 @@ -;;; ipa.el --- Quail package for inputting IPA characters -*-coding: is= o-2022-7bit;-*- - +;;; quail/ipa.el -- Quail package for inputting IPA. -*- coding: utf-8 -= *-=20 +;;;=20 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2= 006 ;; National Institute of Advanced Industrial Science and Technology (A= IST) ;; Registration Number H14PRO021 +;; Licensed to the Free Software Foundation. +;; Copyright (C) 2006 Free Software Foundation, Inc. =20 ;; Keywords: multilingual, input method, IPA =20 @@ -23,11 +25,10 @@ ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. =20 -;;; Commentary: - ;;; Code: =20 (require 'quail) +(eval-when-compile (require 'cl)) =20 (quail-define-package "ipa" "IPA" "IPA" t @@ -37,77 +38,473 @@ nil t nil nil nil nil nil nil nil nil t) =20 (quail-define-rules - ("i" ?=1B,0 =1B(B) - ("I" ?=1B,0!=1B(B) - ("e" ?=1B,0"=1B(B) - ("/3" ?=1B,0#=1B(B) - ("E" ?=1B,0#=1B(B) - ("ae" ?=1B,0$=1B(B) - ("a" ?=1B,0%=1B(B) - ("i-" ?=1B,0&=1B(B) - ("/e" ?=1B,0'=1B(B) - ("/a" ?=1B,0(=1B(B) - ("/m" ?=1B,0)=1B(B) - ("&" ?=1B,0*=1B(B) - ("/v" ?=1B,0+=1B(B) - ("A" ?=1B,0,=1B(B) - ("o|" ?=1B,0,=1B(B) - ("y" ?=1B,0-=1B(B) - ("Y" ?=1B,0.=1B(B) - ("o/" ?=1B,0/=1B(B) - ("oe" ?=1B,00=1B(B) - ("OE" ?=1B,01=1B(B) - ("u-" ?=1B,02=1B(B) - ("o-" ?=1B,03=1B(B) - ("u" ?=1B,04=1B(B) - ("U" ?=1B,05=1B(B) - ("o" ?=1B,06=1B(B) - ("/c" ?=1B,07=1B(B) - ("/A" ?=1B,08=1B(B) - ("|o" ?=1B,08=1B(B) - ("e-" ?=1B,0:=1B(B) - ("e|" ?=1B,0:=1B(B) - ("/3~" ?=1B,0;=1B(B) - ("E~" ?=1B,0;=1B(B) - ("A~" ?=1B,0<=1B(B) - ("oe~" ?=1B,0=3D=1B(B) - ("/c~" ?=1B,0>=1B(B) - ("p" ?=1B,0@=1B(B) - ("b" ?=1B,0A=1B(B) - ("t" ?=1B,0B=1B(B) - ("d" ?=1B,0C=1B(B) - ("k" ?=1B,0D=1B(B) - ("g" ?=1B,0E=1B(B) - ("f" ?=1B,0F=1B(B) - ("v" ?=1B,0G=1B(B) - ("th" ?=1B,0H=1B(B) - ("dh" ?=1B,0I=1B(B) - ("s" ?=1B,0J=1B(B) - ("z" ?=1B,0K=1B(B) - ("sh" ?=1B,0L=1B(B) - ("zh" ?=1B,0M=1B(B) - ("3" ?=1B,0M=1B(B) - ("c," ?=1B,0N=1B(B) - ("x" ?=1B,0O=1B(B) - ("/R" ?=1B,0P=1B(B) - ("h" ?=1B,0Q=1B(B) - ("m" ?=1B,0R=1B(B) - ("n" ?=1B,0S=1B(B) - ("gn" ?=1B,0T=1B(B) - ("ng" ?=1B,0U=1B(B) - ("r" ?=1B,0V=1B(B) - ("R" ?=1B,0W=1B(B) - ("/r" ?=1B,0X=1B(B) - ("j" ?=1B,0Y=1B(B) - ("l" ?=1B,0Z=1B(B) - ("/y" ?=1B,0[=1B(B) - ("L" ?=1B,0\=1B(B) - ("/h" ?=1B,0]=1B(B) - ("w" ?=1B,0^=1B(B) - ("M" ?=1B,0_=1B(B) - ("'" ?=1B,0p=1B(B) - ("`" ?=1B,0q=1B(B) - (":" ?=1B,0r=1B(B)) + ("i" ?i) + ("I" ?=C9=AA) + ("e" ?e) + ("/3" ?=C9=9B) + ("E" ?=C9=9B) + ("ae" ?=C3=A6) + ("a" ?a) + ("i-" ?=C9=A8) + ("/e" ?=C9=99) + ("/a" ?=C9=90) + ("/m" ?=C9=AF) + ("&" ?=C9=A4) + ("/v" ?=CA=8C) + ("A" ?=C9=91) + ("o|" ?=C9=91) + ("y" ?y) + ("Y" ?=CA=8F) + ("o/" ?=C3=B8) + ("oe" ?=C5=93) + ("OE" ?=C9=B6) + ("u-" ?=CA=89) + ("o-" ?=C9=B5) + ("u" ?u) + ("U" ?=CA=8A) + ("o" ?o) + ("/c" ?=C9=94) + ("/A" ?=C9=92) + ("|o" ?=C9=92) + ("e-" ?=C9=9A) + ("e|" ?=C9=9A) + ("p" ?p) + ("b" ?b) + ("t" ?t) + ("d" ?d) + ("k" ?k) + ("g" ?g) + ("f" ?f) + ("v" ?v) + ("th" ?=CE=B8) + ("dh" ?=C3=B0) + ("s" ?s) + ("z" ?z) + ("sh" ?=CA=83) + ("zh" ?=CA=92) + ("3" ?=CA=92) + ("c," ?=C3=A7) + ("x" ?x) + ("/R" ?=CA=81) + ("h" ?h) + ("m" ?m) + ("n" ?n) + ("gn" ?=C9=B2) + ("ng" ?=C5=8B) + ("r" ?r) + ("R" ?=CA=80) + ("/r" ?=C9=B9) + ("j" ?j) + ("l" ?l) + ("/y" ?=CA=8E) + ("L" ?=CA=9F) + ("/h" ?=C9=A5) + ("w" ?w) + ("M" ?=CA=8D) + ("'" ?=CB=88) + ("`" ?=CB=8C) + (":" ?=CB=90)) + +(quail-define-package + "kirshenbaum-ipa" "IPA" "IPA-K" t + "The International Phonetic Alphabet, using Kirshenbaum ASCII translit.= =20 + +Kirshenbaum IPA is an ASCII transliteration of the phonetic alphabet, co= mmon +in the Usenet groups `sci.lang' and `alt.usage.english'. This input met= hod +allows you to type Kirshenbaum on your ASCII-capable keyboard, producing= the +corresponding actual IPA characters in your editor. + +See http://www.kirshenbaum.net/IPA/ascii-ipa.pdf for full details of the +transliteration. + +A caveat with regard to that document; while XEmacs currently preserves +Unicode diacritics on reading and emitting them, it displays them, +incorrectly, as separate from the modified glyphs. ") + +(quail-define-rules + ("r" "=C9=B9") ;; Alveolar approximant U+0279 + ("A" "=C9=91") ;; Low back unrounded vowel U+0251 + ("B" "=CE=B2") ;; Voiced bilabial fricative U+03B2 + ("C" "=C3=A7") ;; Voiced palatal fricative U+00E7 + ("D" "=C3=B0") ;; Voiced dental fricative U+00F0 + ("E" "=C9=9B") ;; Lower-mid front unrounded vowel U+025B + ("G" "=C9=A2") ;; Voiced uvular stop U+0262 + ("H" "=C4=A7") ;; Voiced pharyngeal fricative U+0127 + ("I" "=C9=AA") ;; Semi-high front unrounded vowel U+026A + ("J" "=C9=9F") ;; Voiced palatal stop U+025F + ("L" ["=C9=AB" ;; Voiced velar lateral U+026B + "=CA=9F" ;; Voiced velar lateral U+029F + "=C9=AC"]) ;; Voiced alveolar lateral fricative U+026C + ("M" "=C9=B1") ;; Labio-dental nasal U+0271 + ("N" "=C5=8B") ;; Velar nasal U+014B + ("O" "=C9=94") ;; Low-mid back rounded vowel U+0254 + ("P" "=CE=A6") ;; Voiceless bilabial fricative U+03A6 + ("Q" "=C9=A3") ;; Voiced velar fricative U+0263 + ("R" ["=CA=80" ;; Alveolar trill U+0280 + "=C9=9A"]) ;; Rhotacised schwa U+025A + ("@" "=C9=9A") ;; Mid central rhotacised vowel U+025A + ("S" "=CA=83") ;; Voiced postalveolar fricative U+0283 + ("T" "=CE=B8") ;; Voiced dental fricative U+03B8 + ("U" "=CA=8A") ;; Semi-high back rounded vowel U+028A + ("V" "=CA=8C") ;; Low-mid back unrounded vowel U+028C + ("W" "=C5=93") ;; Low-mid front rounded vowel U+0153 + ("X" "=CF=87") ;; Voiceless uvular fricative U+03C7 + ("Y" "=C3=B8") ;; Upper-mid front rounded vowel U+00F8 + ("Z" "=CA=92") ;; Voiced postalveolar fricative U+0292 + ("?" "=CA=94") ;; Glottal stop U+0294 + ("@" "=C9=99") ;; Mid central unrounded vowel (schwa) U+0259 + ("&" "=C3=A6") ;; Low front unrounded vowel U+00E6 + ("*" "=C9=BE") ;; Voiced alveolar flap U+027E + + ("a~" "=C3=A3") ;; Low central unrounded vowel, nasal U+00E3 + ("o~" "=C3=B5") ;; Upper-mid back rounded vowel, nasal U+00F5 + ("u~" "=C5=A9") ;; High back rounded vowel, nasal U+0169 + ("~" "=CC=83") ;; +Nasalised modifier U+0303 + (":" "=CB=90") ;; +Long modifier U+02D0 + ("-" "=CC=A9") ;; +Syllabic modifier U+0329 + ("." "=CC=A3") ;; +Retroflex modifier U+0323 + ("`" "=CA=BC") ;; +Ejective modifier U+02BC + ("[" "=CC=AA") ;; +Dental modifier U+032A + (";" "=CA=B2") ;; +Palatalised modifier U+02B2 + ("" "=CC=B4") ;; +Pharyngealised modifier U+0334 + ("" "=CA=B0") ;; +Aspirated modifier U+02B0 + ("" ["=CC=A5" ;; +Voiceless modifier U+0325 + "=CB=9A"]) ;; +Unexploded modifier U+02DA + ("" "=CA=B3") ;; +Rhotacised modifier U+02B3 + ("" "=CA=B7") ;; +Labialised modifier U+02B7 + ("" "=CA=B1") ;; +Murmured modififer U+02B1 + + ("b" "=CA=99") ;; Bilabial trill U+0299 + ("b`" "=C9=93") ;; Bilabial implosive U+0253 + ("p!" "=CA=98") ;; Bilabial click U+0298 + ("r" "=CA=8B") ;; Labio-dental approximant U+028B + ("d`" "=C9=97") ;; Dental implosive U+0257 + ("t!" "=CA=87") ;; Dental click U+0287 + ("s" "=C9=AC") ;; Voiceless alveolar lateral fricative U+026C + ("z" "=C9=AE") ;; Voiced alveolar lateral fricative U+026E + ("r" "=CA=80") ;; Alveolar trill U+0280 + + ("*" "=C9=BA") ;; Voiced alveolar lateral flap U+027A + ("c!" "=CA=97") ;; Alveolar click U+0297 + ("l!" "=CA=96") ;; Alveolar lateral click U+0296 + ("n." "=C9=B3") ;; Retroflex nasal U+0273 + ("t." "=CA=88") ;; Voiceless retroflex stop U+0288 + ("d." "=C9=96") ;; Voiced retroflex stop U+0256 + ("s." "=CA=82") ;; Voiceless retroflex fricative U+0282 + ("z." "=CA=90") ;; Voiceless retroflex fricative U+0290 + ("r." "=C9=BB") ;; Retroflex approximant U+027B + ("l." "=C9=AD") ;; Retroflex lateral U+026D + ("*." "=C9=BD") ;; Retroflex flap U+027D + + ("C" "=CA=9D") ;; Voiced palatal fricative U+029D + ("j" "=C9=A5") ;; Rounded palatal approximant U+0265 + ("l^" "=CA=8E") ;; Palatal lateral U+028E + ("J`" "=CA=84") ;; Palatal implosive U+0284 + ("j" "=C9=B0") ;; Velar approximant U+0270 + ("g`" "=C9=A0") ;; Velar implosive U+0260 + ("k!" "=CA=9E") ;; Velar click U+029E +=20 + ("n" ["n=E2=81=80g"]) ;; Labio-velar nasal + ("t" ["k=E2=81=80p"]) ;; Voiceless labio-velar stop + + ;; "n for "gb" WITH U+2030 CHARACTER TIE was ambiguous and + ;; misleading. I _believe_ this is what was meant instead.=20 + ("d" ["g=E2=81=80b"]) ;; Voiced labio-velar stop.=20 + + ("w" "=CA=8D") ;; Voiceless labio-velar stop U+028D + ("n\"" "=C9=B4") ;; Uvular nasal U+0274 + ("g\"" "=CA=81") ;; Voiced uvular fricative U+0281 + ("r\"" "=CA=80") ;; Uvular trill U+0280 + ("G`" "=CA=9B") ;; Voiced uvular implosive U+029B + ("H" "=CA=95") ;; Voiced pharyngeal fricative U+0295 + + ("h" "=C9=A6") ;; Murmured glottal fricative U+0266 + ("I." "=CA=8F") ;; Semi-high front rounded vowel U+028F + ("&." "=C9=B6") ;; Low front unrounded vowel U+0276 + + ("i\"" "=C9=A8") ;; High central unrounded vowel U+0268 + ("u\"" "=CA=89") ;; High central rounded vowel U+0289 + ("@" "=C9=98") ;; Upper-mid central unrounded vowel U+0258 + + ("R" "=C9=9D") ;; Upper-mid central rhotacised vowel U+025D + + ("@." "=C9=B5") ;; Mid central rounded vowel U+0275 + ("V\"" "=C9=9C") ;; Lower-mid central unrounded vowel U+025C + ("O\"" "=C9=9E") ;; Lower-mid central rounded vowel U+025E + ("u-" "=C9=AF") ;; High back unrounded vowel U+026F + ("o-" "=C9=A4") ;; Upper-mid back unrounded vowel U+0264 + ("A." "=C9=92")) ;; Lower back rounded vowel U+0252 + +;; On XEmacs, with the supplied X-SAMPA data, this function is capably +;; implemented with:=20 +;; +;; (list (vector (concat to-prepend quail-keymap))) +;;=20 +;; Supporting GNU Emacs too makes it a good deal more complicated.=20 + +(defun x-sampa-prepend-to-keymap-entry (to-prepend quail-keymap) + "Return QUAIL-KEYMAP with TO-PREPEND at the beginning of each result. + +QUAIL-KEYMAP is a cons that satisfies `quail-map-p'; TO-PREPEND is a +string. " + (when (consp quail-keymap) (setq quail-keymap (cdr quail-keymap))) + (if (or (integerp quail-keymap)=20 + (and (fboundp 'characterp) (characterp quail-keymap))) + (setq quail-keymap (list (string quail-keymap))) + (if (stringp quail-keymap) + (setq quail-keymap (list quail-keymap)) + (assert (vectorp quail-keymap) t) + (setq quail-keymap (append quail-keymap nil)))) + (list=20 + (apply 'vector=20 + (mapcar=20 + '(lambda (entry) + (assert (char-or-string-p entry) t) + (format "%s%s" to-prepend=20 + (if (integerp entry) (string entry) entry))) + quail-keymap)))) + +(defconst x-sampa-implosive-submap=20 + '(("b_<" ?=C9=93) ;; Voiced bilabial implosive U+0253=20 + ("d_<" ?=C9=97) ;; Voiced alveolar implosive U+0257 + ("g_<" ?=C9=A0) ;; Voiced velar implosive U+0260 + ("G\\_<" ?=CA=9B) ;; Voiced uvular implosive U+029B + ("J\\_<" ?=CA=84)) ;; Voiced palatal implosive U+0284 + "A map from the X-SAMPA for some implosive consonants to characters. +This is used because their X-SAMPA syntax is quasi-diacritic, but the +corresponding Unicode characters themselves don't have diacritics, they = are +separate code points. So we need to implement some extra logic that isn= 't +normally provided by Quail. ") + +(defun x-sampa-underscore-implosive (input-string length) + "Return keymap with IPA implosives, for INPUT-STRING, length LENGTH. + +The implosive consonants in X-SAMPA are represented with more or less a +diacritic syntax, but the property +implosive in the IPA is expressed us= ing +separate characters, and not using a diacritic. This function works aro= und +the confusion that implies when generating IPA from X-SAMPA; it returns = a +Quail map that is a copy of the map for `_', but with all the DIACRITIC +entries changed to return the diacritic together with the base character= , +and with the map to the implosive added to its end. + +Like all `quail-defrule'-assigned functions, this will be called once fo= r +each particular sequence of keys, the first time the user types that +particular sequence of keys, and the result will be cached by Quail. " + (let* ((input-string (substring input-string 0 (or length))) + (underscore-map (copy-tree (quail-lookup-key "_"))) + (split-input (split-string input-string "_")) + (pre-underscore (car split-input)) + (pre-underscore-map (quail-lookup-key pre-underscore)) + (x-sampa-submap-entry=20 + (assoc (format "%s<" input-string) x-sampa-implosive-submap)) + underscore-map-entry) + (if (and (consp pre-underscore-map) (car pre-underscore-map)) + (setq pre-underscore-map (car pre-underscore-map)) + (setq pre-underscore-map pre-underscore)) + (unless (stringp pre-underscore-map) + (setq pre-underscore-map (string pre-underscore-map))) + (dolist (underscoring underscore-map) + (cond ((null underscoring)) + ((eq (length underscoring) 2) + (setq underscore-map-entry (second underscoring)) + (setcdr underscoring (x-sampa-prepend-to-keymap-entry=20 + pre-underscore-map underscore-map-entry))) + ((eq (length underscoring) 3) + (setq underscore-map-entry (second (third underscoring))) + (setcdr (third underscoring)=20 + (x-sampa-prepend-to-keymap-entry=20 + pre-underscore-map underscore-map-entry))) + (t=20 + (assert (null t) t=20 + "Can't handle subtrees of this level right now.")))) + (append underscore-map (list (list ?< (second x-sampa-submap-entry))= )))) + +(quail-define-package + "x-sampa-ipa" "IPA" "IPA-X" t + "The International Phonetic Alphabet, using J.C. Wells' X-SAMPA.=20 + +X-SAMPA is an ASCII transliteration of the IPA, normally used for data +exchange in environments where Unicode is not available. This input met= hod +uses this transliteration to allow you to produce the IPA in your editor +with a keyboard that's limited to ASCII. + +See http://www.phon.ucl.ac.uk/home/sampa/ipasam-x.pdf for a full definit= ion +of the mapping. A caveat with regard to that document; while XEmacs +currently preserves Unicode diacritics on reading and emitting them, it +displays them, incorrectly, as separate from the modified glyphs. " nil = t t) + +(quail-define-rules + ;; Table taken from http://en.wikipedia.org/wiki/X-SAMPA, checked with + ;; http://www.phon.ucl.ac.uk/home/sampa/ipasam-x.pdf + + ("d`" "=C9=96") ;; Voiced retroflex plosive U+0256 + + ;; In the Wikipedia article, they list ASCII g as mapping to U+0261, LA= TIN + ;; SMALL LETTER SCRIPT G. The typeset g is equally acceptable as the vo= iced + ;; velar plosive, however, and we don't override the identity mapping h= ere. + + ("h\\" "=C9=A6") ;; Voiced glottal fricative U+0266 + ("j\\" "=CA=9D") ;; Voiced palatal fricative U+029D + ("l`" "=C9=AD") ;; Retroflex lateral approximant U+026D + ("l\\" "=C9=BA") ;; Alveolar lateral flap U+027A + ("n`" "=C9=B3") ;; Retroflex nasal U+0273 + ("p\\" "=C9=B8") ;; Voiceless bilabial fricative U+0278 + ("r`" "=C9=BD") ;; Retroflex flap U+027D + ("r\\" "=C9=B9") ;; Alveolar approximant U+0279 + ("r\\`" "=C9=BB") ;; Retroflex approximant U+027B + ("s`" "=CA=82") ;; Voiceless retroflex fricative U+0282 + ("s\\" "=C9=95") ;; Voiceless alveolo-palatal fricative U+0255 + ("t`" "=CA=88") ;; Voiceless retroflex plosive U+0288 + ("v\\" "=CA=8B") ;; Labiodental approximant U+028B + ("x\\" "=C9=A7") ;; Voiceless palatal-velar fricative U+0267 + ("z`" "=CA=90") ;; Voiced retroflex fricative U+0290 + ("z\\" "=CA=91") ;; Voiced alveolo-palatal fricative U+0291 + ("A" "=C9=91") ;; Open back unrounded vowel U+0251 + ("B" "=CE=B2") ;; Voiced bilabial fricative U+03B2 + ("B\\" "=CA=99") ;; Bilabial trill U+0299 + ("C" "=C3=A7") ;; Voiceless palatal fricative U+00E7 + ("D" "=C3=B0") ;; Voiced dental fricative U+00F0 + ("E" "=C9=9B") ;; Open-mid front unrounded vowel U+025B + ("F" "=C9=B1") ;; Labiodental nasal U+0271 + ("G" "=C9=A3") ;; Voiced velar fricative U+0263 + ("G\\" "=C9=A2") ;; Voiced uvular plosive U+0262 + ("H" "=C9=A5") ;; Labial-palatal approximant U+0265 + ("H\\" "=CA=9C") ;; Voiceless epiglottal fricative U+029C + ("I" "=C9=AA") ;; Near-close near-front unrounded vowel U+026A + ("I\\" "=C6=97") ;; Central lax close unrounded vowel U+0197 + ("J" "=C9=B2") ;; Palatal nasal U+0272 + ("J\\" "=C9=9F") ;; Voiceless palatal plosive U+025F + ("K" "=C9=AC") ;; Voiceless alveolar lateral fricative U+026C + ("K\\" "=C9=AE") ;; Voiced alveolar lateral fricative U+026E + ("L" "=CA=8E") ;; Palatal lateral approximant U+028E + ("L\\" "=CA=9F") ;; Velar lateral approximant U+029F + ("M" "=C9=AF") ;; Close back unrounded vowel U+026F + ("M\\" "=C9=B0") ;; Velar approximant U+0270 + ("N" "=C5=8B") ;; Velar nasal U+014B + ("N\\" "=C9=B4") ;; Uvular nasal U+0274 + ("O" "=C9=94") ;; Open-mid back rounded vowel U+0254 + ("O\\" "=CA=98") ;; Bilabial click U+0298 + ("P" "=CA=8B") ;; Labiodental approximant U+028B + ("Q" "=C9=92") ;; Open back rounded vowel U+0252 + ("R" "=CA=81") ;; Voiced uvular fricative U+0281 + ("R\\" "=CA=80") ;; Uvular trill U+0280 + ("S" "=CA=83") ;; Voiceless postalveolar fricative U+0283 + ("T" "=CE=B8") ;; Voiceless dental fricative U+03B8 + ("U" "=CA=8A") ;; Near-close near-back rounded vowel U+028A + ("U\\" ["=CA=8A=CC=B5"]) ;; Central lax close rounded vowel, U+028A U+0= 335 + ("V" "=CA=8C") ;; Open-mid back unrounded vowel U+028C + ("W" "=CA=8D") ;; Voiceless labial-velar fricative U+028D + ("X" "=CF=87") ;; Voiceless uvular fricative U+03C7 + ("X\\" "=C4=A7") ;; Voiceless pharyngeal fricative U+0127 + ("Y" "=CA=8F") ;; Near-close near-front rounded vowel U+028F + ("Z" "=CA=92") ;; Voiced postalveolar fricative U+0292 + + ("\"" "=CB=88") ;; Primary stress U+02C8 + ("%" "=CB=8C") ;; Secondary stress U+02CC + (":" "=CB=90") ;; Long U+02D0 + (":\\" "=CB=91") ;; Half-long U+02D1 + ("@" "=C9=99") ;; Schwa U+0259 + ("@\\" "=C9=98") ;; Close-mid central unrounded vowel U+0258 + ("@`" "=C9=9A") ;; Rhotacised schwa U+025A + ("{" "=C3=A6") ;; Near-open front unrounded vowel U+00E6 + ("}" "=CA=89") ;; Close central rounded vowel U+0289 + ("1" "=C9=A8") ;; Close central unrounded vowel U+0268 + ("2" "=C3=B8") ;; Close-mid front rounded vowel U+00F8 + ("3" "=C9=9C") ;; Open-mid central unrounded vowel U+025C + ("3\\" "=C9=9E") ;; Open-mid central rounded vowel U+025E + ("4" "=C9=BE") ;; Alveolar flap U+027E + ("5" "=C9=AB") ;; Velarised alveolar lateral approximant U+026B + ("6" "=C9=90") ;; Near-open central vowel U+0250 + ("7" "=C9=A4") ;; Close-mid back unrounded vowel U+0264 + ("8" "=C9=B5") ;; Close-mid central rounded vowel U+0275 + ("9" "=C5=93") ;; Open-mid front rounded vowel U+0153 + ("&" "=C9=B6") ;; Open front rounded vowel U+0276 + ("?" "=CA=94") ;; Glottal stop U+0294 + ("?\\" "=CA=95") ;; Voiced pharyngeal fricative U+0295 + ;; The undefined escape character, ignored.=20 + ;; Indeterminacy in French vowels, ignored. + ;; Begin nonsegmental notation, ignored.=20 + ("<\\" "=CA=A2") ;; Voiced epiglottal fricative U+02A2 + ;; End nonsegmental notation, ignored.=20 + (">\\" "=CA=A1") ;; Epiglottal plosive U+02A1 + ("^" "=E2=86=91") ;; Upstep U+2191 + ("!" "=E2=86=93") ;; Downstep U+2193 + ("!\\" "=C7=83") ;; Postalveolal click U+01C3 + ("\\" "=C7=80") ;; Dental click U+01C0 + ("\\|\\" "=C7=81") ;; Lateral alveolar click U+01C1 + ("=3D\\" "=C7=82") ;; Palatal click U+01C2 + ("-\\" "=CC=AE") ;; Linking mark U+032E + + ;; Diacritics. Note that XEmacs doesn't yet have composed characters, s= o we + ;; can input them, but they won't display properly. If you send email u= sing + ;; them, and the recipient's client is capable, they will get through, + ;; though. + + ("_\"" "=CC=88") ;; Centralised U+0308 + ("_+" "=CC=9F") ;; Advanced U+031F + ("_-" "=CC=A0") ;; Retracted U+0320 + ("_/" "=CB=87") ;; Rising tone U+02C7 + ("_0" "=CC=A5") ;; Voiceless U+0325 + ("_=3D" "=CC=A9") ;; Syllabic U+0329 + ("=3D" "=CC=A9") ;; Syllabic U+0329 + ("_>" "=CA=BC") ;; Ejective U+02BC + ("_?\\" "=CB=A4") ;; Pharyngealised U+02E4 + ("_\\" "=CB=86") ;; Falling Tone U+02C6 + ("_^" "=CC=AF") ;; Non-syllabic U+032F + ("_}" "=CC=9A") ;; No audible release U+031A + ;; ` is alternatively; retroflexion in consonants + ("`" "=CB=9E") ;; Rhotacization in vowels U+02DE + ("_~" "=CC=83") ;; Nasalisation U+0303 + ("~" "=CC=83") ;; Nasalisation U+0303 + ("_A" "=CC=98") ;; Advanced tongue root U+0318 + ("_a" "=CC=BA") ;; Apical U+033A + ("_B" "=CC=8F") ;; Extra low tone U+030F + ;; _B_L omitted, no Unicode code point for "low rising tone." + ("_c" "=CC=9C") ;; Less rounded U+031C + ("_d" "=CC=AA") ;; Dental U+032A + ("_e" "=CC=B4") ;; Velarised or pharyngeal U+0334 + + ("" "=E2=86=99") ;; Global fall; SOUTH EAST ARROW; may be a bit smal= ler than + ;; intended. + ("_F" "=CC=82") ;; Falling tone U+0302 + ("_G" "=CB=A0") ;; Velarised U+02E0 + ("_H" "=CC=81") ;; High tone U+0301 + ;; "_H_T omitted, no Unicode code point for "high rising tone" + ("_h" "=CA=B0") ;; Aspirated U+02B0 + ("_j" "=CA=B2") ;; Palatalised U+02B2 + ("'" "=CA=B2") ;; Palatalised U+02B2 + ("_k" "=CC=B0") ;; Creaky voice U+0330 + ("_L" "=CC=80") ;; Low tone U+0300 + ("_l" "=CB=A1") ;; Lateral release U+02E1 + ("_M" "=CC=84") ;; Mid tone U+0304 + ("_m" "=CC=BB") ;; Laminal U+033B + ("_N" "=CC=BC") ;; Linguolabial U+033C + ("_n" "=E2=81=BF") ;; Nasal release U+207F + ("_O" "=CC=B9") ;; More rounded U+0339 + ("_o" "=CC=9E") ;; Lowered U+031E + ("_q" "=CC=99") ;; Retracted tongue root U+0319 + ("" "=E2=86=97") ;; NORTH EAST ARROW; may be a bit smaller than inte= nded.=20 + ("_R" "=CC=8C") ;; Ha=C4=8Dek, caron, rising tone. U+030C + ;; _R_F omitted, apparently there's no corresponding Unicode entry.=20 + ("_r" "=CC=9D") ;; Raised U+031D + ("_T" "=CC=8B") ;; Extra high tone U+030B + ("_t" "=CC=A4") ;; Breathy voice U+0324 + ("_v" "=CC=AC") ;; Voiced U+032C + ("_w" "=CA=B7") ;; Labialised U+02B7 + ("_X" "=CC=86") ;; Extra-short U+0306 + ("_x" "=CC=BD")) ;; Mid-centralised U+033D + +;; Putting in place rules for the implosives like for the others above +;; breaks the "_" rules for b, d, g, G and J a little--you ne= ed +;; to interrupt Quail before typing the underscore if you want the +;; diacritic. To avoid this, handle the input specially with the functio= n +;; x-sampa-underscore-implosive. + +(dolist (implosive-x-sampa (mapcar 'car x-sampa-implosive-submap)) + (setq implosive-x-sampa (car (split-string implosive-x-sampa "_"))) + (quail-defrule (format "%s_" implosive-x-sampa) + 'x-sampa-underscore-implosive)) =20 ;;; arch-tag: cf2614cc-ecce-4ef5-ba51-37faeed41691 ;;; ipa.el ends here + --=20 When I was in the scouts, the leader told me to pitch a tent. I couldn't find any pitch, so I used creosote. --wNNNfbStpN Content-Type: text/plain; charset=iso-8859-1 Content-Description: .signature Content-Transfer-Encoding: quoted-printable --=20 =BFD=F3nde estar=E1 ahora mi sobrino Yoghurtu Ngh=E9, que tuvo que huir precipitadamente de la aldea por culpa de la escasez de rinocerontes? --wNNNfbStpN--