APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1315846767 -3600
# Node ID 7f33a75296ac97e9d0eecbb76907bf32cb43477f
# Parent a53c6d7f6ae2bfbf3c7f19ea8553501e2b30ec28
Sync GNU's changes to ipa-21.5.el, leim
leim/ChangeLog addition:
2011-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
* leim-list.el: Update to reflect new input method names.
* quail/ipa-21.5.el:
Sync these changes from GNU:
2009-08-31 Juri Linkov <juri(a)jurta.org>
* quail/ipa.el ("ipa"): Set `forget-last-selection' to nil.
("ipa-x-sampa"): Set `forget-last-selection' to nil.
Set `deterministic' to nil.
("ipa"): Bind "g" to U+0261, and "tsh" to a list of
"U+02A7",
"U+0074 U+0283", "U+0074 U+2040 U+0283".
("ipa-kirshenbaum", ipa-x-sampa"): Bind "g" to U+0261, and
"tS"
to a list of "U+02A7", "U+0074 U+0283", "U+0074 U+2040
U+0283".
Fix comments.
2009-08-31 Juri Linkov <juri(a)jurta.org>
* quail/ipa.el ("ipa-kirshenbaum"): Rename from "kirshenbaum-ipa".
("ipa-x-sampa"): Rename from "x-sampa-ipa".
(ipa-x-sampa-implosive-submap): Rename from
x-sampa-implosive-submap.
(ipa-x-sampa-prepend-to-keymap-entry): Rename from
x-sampa-prepend-to-keymap-entry.
(ipa-x-sampa-underscore-implosive): Rename from
x-sampa-underscore-implosive.
(ipa-x-sampa-implosive-submap): Move before first use.
diff -r a53c6d7f6ae2 -r 7f33a75296ac ChangeLog
--- a/ChangeLog Sat Sep 03 14:42:12 2011 +0200
+++ b/ChangeLog Mon Sep 12 17:59:27 2011 +0100
@@ -1,3 +1,33 @@
+2011-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * leim-list.el: Update to reflect new input method names.
+
+ * quail/ipa-21.5.el:
+ Sync these changes from GNU:
+
+ 2009-08-31 Juri Linkov <juri(a)jurta.org>
+
+ * quail/ipa.el ("ipa"): Set `forget-last-selection' to nil.
+ ("ipa-x-sampa"): Set `forget-last-selection' to nil.
+ Set `deterministic' to nil.
+ ("ipa"): Bind "g" to U+0261, and "tsh" to a list of
"U+02A7",
+ "U+0074 U+0283", "U+0074 U+2040 U+0283".
+ ("ipa-kirshenbaum", ipa-x-sampa"): Bind "g" to U+0261, and
"tS"
+ to a list of "U+02A7", "U+0074 U+0283", "U+0074 U+2040
U+0283".
+ Fix comments.
+
+ 2009-08-31 Juri Linkov <juri(a)jurta.org>
+
+ * quail/ipa.el ("ipa-kirshenbaum"): Rename from "kirshenbaum-ipa".
+ ("ipa-x-sampa"): Rename from "x-sampa-ipa".
+ (ipa-x-sampa-implosive-submap): Rename from
+ x-sampa-implosive-submap.
+ (ipa-x-sampa-prepend-to-keymap-entry): Rename from
+ x-sampa-prepend-to-keymap-entry.
+ (ipa-x-sampa-underscore-implosive): Rename from
+ x-sampa-underscore-implosive.
+ (ipa-x-sampa-implosive-submap): Move before first use.
+
2010-09-05 Norbert Koch viteno(a)xemacs.org
* Makefile (VERSION): XEmacs package 1.32 released.
diff -r a53c6d7f6ae2 -r 7f33a75296ac leim-list.el
--- a/leim-list.el Sat Sep 03 14:42:12 2011 +0200
+++ b/leim-list.el Mon Sep 12 17:59:27 2011 +0100
@@ -422,6 +422,16 @@
"International Phonetic Alphabet, X-SAMPA ASCII transliteration."
"ipa-21.5")
(register-input-method
+ "ipa-kirshenbaum" "IPA" 'quail-use-package
+ "IPA-K"
+ "International Phonetic Alphabet, Kirshenbaum ASCII transliteration."
+ "ipa-21.5")
+ (register-input-method
+ "ipa-x-sampa" "IPA" 'quail-use-package
+ "IPA-S"
+ "International Phonetic Alphabet, X-SAMPA ASCII transliteration."
+ "ipa-21.5")
+ (register-input-method
"ipa" "IPA" 'quail-use-package
"IPA"
"International Phonetic Alphabet for English, French, German and Italian"
diff -r a53c6d7f6ae2 -r 7f33a75296ac quail/ipa-21.5.el
--- a/quail/ipa-21.5.el Sat Sep 03 14:42:12 2011 +0200
+++ b/quail/ipa-21.5.el Mon Sep 12 17:59:27 2011 +0100
@@ -1,17 +1,20 @@
-;;; quail/ipa.el -- Quail package for inputting IPA. -*- coding: utf-8 -*-
-;;;
-;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
-;; Copyright (C) 2006 Free Software Foundation, Inc.
+;;; ipa.el --- Quail package for inputting IPA characters -*-coding: utf-8;-*-
+
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+;; 2006, 2007, 2008, 2009, 2010, 2011
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H14PRO021
;; Licensed to the Free Software Foundation.
+;; Copyright (C) 2009-2011 Free Software Foundation, Inc.
;; Keywords: multilingual, input method, IPA
;; This file is part of XEmacs.
-;; XEmacs is free software; you can redistribute it and/or modify
+;; XEmacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; XEmacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,19 +22,19 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02110-1301, USA
+;; along with XEmacs. If not, see <
http://www.gnu.org/licenses/>.
-;;; Synched up with: FSF 22.0.50.6
+;;; Synched up with: last FSF of 2009-08-31.
;; This file is ipa.el, but re-encoded to UTF-8, and greatly expanded to
;; support the common ASCII transliterations of the IPA.
+;;; Commentary:
+
;;; Code:
(require 'quail)
-(require 'cl)
+(eval-when-compile (require 'cl))
;; This file breaks with 21.4 and early 21.5. It should be merged with
;; ipa.el when 21.4 is declared obsolete.
@@ -44,7 +47,7 @@
"International Phonetic Alphabet for English, French, German and Italian
Upside-down characters are obtained by a preceding slash (/)."
- nil t nil nil nil nil nil nil nil nil t)
+ nil nil nil nil nil nil nil nil nil nil t)
(quail-define-rules
("i" ?i)
@@ -87,7 +90,7 @@
("t" ?t)
("d" ?d)
("k" ?k)
- ("g" ?g)
+ ("g" ?ɡ)
("f" ?f)
("v" ?v)
("th" ?θ)
@@ -95,6 +98,7 @@
("s" ?s)
("z" ?z)
("sh" ?ʃ)
+ ("tsh" ["ʧ" "tʃ" "t⁀ʃ"])
("zh" ?ʒ)
("3" ?ʒ)
("c," ?ç)
@@ -120,8 +124,8 @@
(":" ?ː))
(quail-define-package
- "kirshenbaum-ipa" "IPA" "IPA-K" t
- "The International Phonetic Alphabet, using Kirshenbaum ASCII translit.
+ "ipa-kirshenbaum" "IPA" "IPA-K" t
+ "The International Phonetic Alphabet, using Kirshenbaum ASCII translit.
Kirshenbaum IPA is an ASCII transliteration of the phonetic alphabet, common
in the Usenet groups `sci.lang' and `alt.usage.english'. This input method
@@ -133,13 +137,13 @@
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. ")
+incorrectly, as separate from the modified glyphs.")
(quail-define-rules
+ ("g" "ɡ") ;; Voiced velar plosive U+0261
("r" "ɹ") ;; Alveolar approximant U+0279
("A" "ɑ") ;; Low back unrounded vowel U+0251
- ("B" "β") ;
- ; Voiced bilabial fricative U+03B2
+ ("B" "β") ;; Voiced bilabial fricative U+03B2
("C" "ç") ;; Voiced palatal fricative U+00E7
("D" "ð") ;; Voiced dental fricative U+00F0
("E" "ɛ") ;; Lower-mid front unrounded vowel U+025B
@@ -158,8 +162,11 @@
("R" ["ʀ" ;; Alveolar trill U+0280
"ɚ"]) ;; Rhotacised schwa U+025A
("@<r>" "ɚ") ;; Mid central rhotacised vowel U+025A
- ("S" "ʃ") ;; Voiced postalveolar fricative U+0283
- ("T" "θ") ;; Voiced dental fricative U+03B8
+ ("S" "ʃ") ;; Voiceless postalveolar fricative U+0283
+ ("tS" ["ʧ" ;; Voiceless postalveolar affricate U+02A7
+ "tʃ" ;; U+0074 U+0283
+ "t⁀ʃ"]) ;; U+0074 U+2040 U+0283
+ ("T" "θ") ;; Voiceless dental fricative U+03B8
("U" "ʊ") ;; Semi-high back rounded vowel U+028A
("V" "ʌ") ;; Low-mid back unrounded vowel U+028C
("W" "œ") ;; Low-mid front rounded vowel U+0153
@@ -218,13 +225,13 @@
("j<vel>" "ɰ") ;; Velar approximant U+0270
("g`" "ɠ") ;; Velar implosive U+0260
("k!" "ʞ") ;; Velar click U+029E
-
+
("n<lbv>" ["n⁀g"]) ;; Labio-velar nasal
("t<lbv>" ["k⁀p"]) ;; Voiceless labio-velar stop
;; "n<lbv> for "gb" WITH U+2030 CHARACTER TIE was ambiguous and
- ;; misleading. I _believe_ this is what was meant instead.
- ("d<lbv>" ["g⁀b"]) ;; Voiced labio-velar stop.
+ ;; misleading. I _believe_ this is what was meant instead.
+ ("d<lbv>" ["g⁀b"]) ;; Voiced labio-velar stop.
("w<vls>" "ʍ") ;; Voiceless labio-velar stop U+028D
("n\"" "ɴ") ;; Uvular nasal U+0274
@@ -250,36 +257,49 @@
("o-" "ɤ") ;; Upper-mid back unrounded vowel U+0264
("A." "ɒ")) ;; Lower back rounded vowel U+0252
+
+(defconst ipa-x-sampa-implosive-submap
+ '(("b_<" ?ɓ) ;; Voiced bilabial implosive U+0253
+ ("d_<" ?ɗ) ;; Voiced alveolar implosive U+0257
+ ("g_<" ?ɠ) ;; Voiced velar implosive U+0260
+ ("G\\_<" ?ʛ) ;; Voiced uvular implosive U+029B
+ ("J\\_<" ?ʄ)) ;; 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.")
+
;; On XEmacs, with the supplied X-SAMPA data, this function is capably
-;; implemented with:
+;; implemented with:
;;
;; (list (vector (concat to-prepend quail-keymap)))
-;;
-;; Supporting GNU Emacs too makes it a good deal more complicated.
+;;
+;; Supporting GNU Emacs too makes it a good deal more complicated.
-(defun x-sampa-prepend-to-keymap-entry (to-prepend quail-keymap)
+(defun ipa-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. "
+string."
(when (consp quail-keymap) (setq quail-keymap (cdr quail-keymap)))
- (if (or (integerp quail-keymap)
+ (if (or (integerp quail-keymap)
(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
- (apply 'vector
- (mapcar
+ (list
+ (apply 'vector
+ (mapcar
#'(lambda (entry)
(assert (char-or-string-p entry) t)
- (format "%s%s" to-prepend
+ (format "%s%s" to-prepend
(if (integerp entry) (string entry) entry)))
quail-keymap))))
-(defun x-sampa-underscore-implosive (input-string length)
+(defun ipa-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
@@ -292,14 +312,14 @@
Like all `quail-defrule'-assigned functions, this will be called once for
each particular sequence of keys, the first time the user types that
-particular sequence of keys, and the result will be cached by Quail. "
+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
- (assoc (format "%s<" input-string) x-sampa-implosive-submap))
+ (x-sampa-submap-entry
+ (assoc (format "%s<" input-string) ipa-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))
@@ -310,21 +330,21 @@
(cond ((null underscoring))
((eq (length underscoring) 2)
(setq underscore-map-entry (second underscoring))
- (setcdr underscoring (x-sampa-prepend-to-keymap-entry
+ (setcdr underscoring (ipa-x-sampa-prepend-to-keymap-entry
pre-underscore-map underscore-map-entry)))
((eq (length underscoring) 3)
(setq underscore-map-entry (second (third underscoring)))
- (setcdr (third underscoring)
- (x-sampa-prepend-to-keymap-entry
+ (setcdr (third underscoring)
+ (ipa-x-sampa-prepend-to-keymap-entry
pre-underscore-map underscore-map-entry)))
- (t
- (assert (null t) t
+ (t
+ (assert (null t) t
"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.
+ "ipa-x-sampa" "IPA" "IPA-X" t
+ "The International Phonetic Alphabet, using J.C. Wells' X-SAMPA.
X-SAMPA is an ASCII transliteration of the IPA, normally used for data
exchange in environments where Unicode is not available. This input method
@@ -334,18 +354,14 @@
See
http://www.phon.ucl.ac.uk/home/sampa/ipasam-x.pdf for a full definition
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)
+displays them, incorrectly, as separate from the modified glyphs.")
(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`" "ɖ") ;; Voiced retroflex plosive U+0256
-
- ;; In the Wikipedia article, they list ASCII g as mapping to U+0261, LATIN
- ;; SMALL LETTER SCRIPT G. The typeset g is equally acceptable as the voiced
- ;; velar plosive, however, and we don't override the identity mapping here.
-
+ ("g" "ɡ") ;; Voiced velar plosive U+0261
("h\\" "ɦ") ;; Voiced glottal fricative U+0266
("j\\" "ʝ") ;; Voiced palatal fricative U+029D
("l`" "ɭ") ;; Retroflex lateral approximant U+026D
@@ -392,6 +408,9 @@
("R" "ʁ") ;; Voiced uvular fricative U+0281
("R\\" "ʀ") ;; Uvular trill U+0280
("S" "ʃ") ;; Voiceless postalveolar fricative U+0283
+ ("tS" ["ʧ" ;; Voiceless postalveolar affricate U+02A7
+ "tʃ" ;; U+0074 U+0283
+ "t⁀ʃ"]) ;; U+0074 U+2040 U+0283
("T" "θ") ;; Voiceless dental fricative U+03B8
("U" "ʊ") ;; Near-close near-back rounded vowel U+028A
("U\\" ["ʊ̵"]) ;; Central lax close rounded vowel, U+028A U+0335
@@ -424,11 +443,11 @@
("&" "ɶ") ;; Open front rounded vowel U+0276
("?" "ʔ") ;; Glottal stop U+0294
("?\\" "ʕ") ;; Voiced pharyngeal fricative U+0295
- ;; The undefined escape character, ignored.
+ ;; The undefined escape character, ignored.
;; Indeterminacy in French vowels, ignored.
- ;; Begin nonsegmental notation, ignored.
+ ;; Begin nonsegmental notation, ignored.
("<\\" "ʢ") ;; Voiced epiglottal fricative U+02A2
- ;; End nonsegmental notation, ignored.
+ ;; End nonsegmental notation, ignored.
(">\\" "ʡ") ;; Epiglottal plosive U+02A1
("^" "↑") ;; Upstep U+2191
("!" "↓") ;; Downstep U+2193
@@ -486,9 +505,9 @@
("_O" "̹") ;; More rounded U+0339
("_o" "̞") ;; Lowered U+031E
("_q" "̙") ;; Retracted tongue root U+0319
- ("<R>" "↗") ;; NORTH EAST ARROW; may be a bit smaller than
intended.
+ ("<R>" "↗") ;; NORTH EAST ARROW; may be a bit smaller than
intended.
("_R" "̌") ;; Haček, caron, rising tone. U+030C
- ;; _R_F omitted, apparently there's no corresponding Unicode entry.
+ ;; _R_F omitted, apparently there's no corresponding Unicode entry.
("_r" "̝") ;; Raised U+031D
("_T" "̋") ;; Extra high tone U+030B
("_t" "̤") ;; Breathy voice U+0324
@@ -497,27 +516,24 @@
("_X" "̆") ;; Extra-short U+0306
("_x" "̽")) ;; Mid-centralised U+033D
-(defconst x-sampa-implosive-submap
- '(("b_<" ?ɓ) ;; Voiced bilabial implosive U+0253
- ("d_<" ?ɗ) ;; Voiced alveolar implosive U+0257
- ("g_<" ?ɠ) ;; Voiced velar implosive U+0260
- ("G\\_<" ?ʛ) ;; Voiced uvular implosive U+029B
- ("J\\_<" ?ʄ)) ;; 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. ")
-
;; Putting in place rules for the implosives like for the others above
;; breaks the "_<diacritic>" rules for b, d, g, G and J a little--you
need
;; to interrupt Quail before typing the underscore if you want the
;; diacritic. To avoid this, handle the input specially with the function
-;; x-sampa-underscore-implosive.
+;; ipa-x-sampa-underscore-implosive.
-(dolist (implosive-x-sampa (mapcar 'car x-sampa-implosive-submap))
+(dolist (implosive-x-sampa (mapcar 'car ipa-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))
+ 'ipa-x-sampa-underscore-implosive))
-(provide 'ipa)
+;; XEmacs; add the original names for the Kirshenbaum and X-SAMPA maps as
+;; aliases.
+
+(setq quail-package-alist
+ `(("x-sampa-ipa" . ,(cdr (assoc "ipa-x-sampa"
quail-package-alist)))
+ ("kirshenbaum-ipa" . ,(cdr (assoc "ipa-kirshenbaum"
+ quail-package-alist)))
+ ,@quail-package-alist))
+
+;;; ipa.el ends here
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches