emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/language/european.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/language/european.el,v
Date: Fri, 01 Feb 2008 16:02:27 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     08/02/01 16:01:31

Index: lisp/language/european.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/language/european.el,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -b -r1.101 -r1.102
--- lisp/language/european.el   8 Jan 2008 20:45:57 -0000       1.101
+++ lisp/language/european.el   1 Feb 2008 16:01:01 -0000       1.102
@@ -6,6 +6,9 @@
 ;;   2005, 2006, 2007, 2008
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
+;; Copyright (C) 2003
+;;   National Institute of Advanced Industrial Science and Technology (AIST)
+;;   Registration Number H13PRO009
 
 ;; Keywords: multilingual, European
 
@@ -36,15 +39,14 @@
 ;; Latin-1 (ISO-8859-1)
 
 (set-language-info-alist
- "Latin-1" '((charset ascii latin-iso8859-1)
-            (coding-system iso-latin-1)
-            (coding-priority iso-latin-1 windows-1252)
-            (nonascii-translation . latin-iso8859-1)
-            (unibyte-syntax . "latin-1")
+ "Latin-1" '((charset iso-8859-1)
+            (coding-system iso-latin-1 iso-latin-9 windows-1252)
+            (coding-priority iso-latin-1)
+            (nonascii-translation . iso-8859-1)
             (unibyte-display . iso-latin-1)
             (input-method . "latin-1-prefix")
             (sample-text
-             . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, 
,A!(BHola!")
+             . "Hello, Hej, Tere, Hei, Bonjour, Gr$(D+d)N(B Gott, Ciao, 
$(D"B(BHola!")
             (documentation . "\
 This language environment is a generic one for the Latin-1 (ISO-8859-1)
 character set which supports the following European languages:
@@ -65,42 +67,24 @@
 Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans."))
  '("European"))
 
-(eval-and-compile
-  (setq
-   non-iso-charset-alist
-   (cp-make-coding-system
-    windows-1252
-    [?\$,1tL(B nil ?\$,1rz(B ?\$,1!R(B ?\$,1r~(B ?\$,1s&(B ?\$,1s 
(B ?\$,1s!(B ?\$,1$f(B ?\$,1s0(B ?\$,1! (B ?\$,1s9(B ?\$,1 r(B nil 
?\$,1!=(B nil nil
-        ?\$,1rx(B ?\$,1ry(B ?\$,1r|(B ?\$,1r}(B ?\$,1s"(B 
?\$,1rs(B ?\$,1rt(B ?\$,1$|(B ?\$,1ub(B ?\$,1!!(B ?\$,1s:(B ?\$,1 
s(B nil ?\$,1!>(B ?\$,1!8(B ?\,A (B ?\,A!(B
-        ?\,A"(B ?\,A#(B ?\,A$(B ?\,A%(B ?\,A&(B ?\,A'(B ?\,A((B 
?\,A)(B ?\,A*(B ?\,A+(B ?\,A,(B ?\,A-(B ?\,A.(B ?\,A/(B ?\,A0(B 
?\,A1(B ?\,A2(B
-        ?\,A3(B ?\,A4(B ?\,A5(B ?\,A6(B ?\,A7(B ?\,A8(B ?\,A9(B 
?\,A:(B ?\,A;(B ?\,A<(B ?\,A=(B ?\,A>(B ?\,A?(B 
?\,address@hidden(B ?\,AA(B ?\,AB(B ?\,AC(B
-        ?\,AD(B ?\,AE(B ?\,AF(B ?\,AG(B ?\,AH(B ?\,AI(B ?\,AJ(B 
?\,AK(B ?\,AL(B ?\,AM(B ?\,AN(B ?\,AO(B ?\,AP(B ?\,AQ(B ?\,AR(B 
?\,AS(B ?\,AT(B
-        ?\,AU(B ?\,AV(B ?\,AW(B ?\,AX(B ?\,AY(B ?\,AZ(B ?\,A[(B 
?\,A\(B ?\,A](B ?\,A^(B ?\,A_(B ?\,A`(B ?\,Aa(B ?\,Ab(B ?\,Ac(B 
?\,Ad(B ?\,Ae(B
-        ?\,Af(B ?\,Ag(B ?\,Ah(B ?\,Ai(B ?\,Aj(B ?\,Ak(B ?\,Al(B 
?\,Am(B ?\,An(B ?\,Ao(B ?\,Ap(B ?\,Aq(B ?\,Ar(B ?\,As(B ?\,At(B 
?\,Au(B ?\,Av(B
-        ?\,Aw(B ?\,Ax(B ?\,Ay(B ?\,Az(B ?\,A{(B ?\,A|(B ?\,A}(B 
?\,A~(B ?\,A(B])))
-
-(define-coding-system-alias 'cp1252 'windows-1252)
-
 
 ;; Latin-2 (ISO-8859-2)
 
-(make-coding-system
- 'iso-latin-2 2 ?2
+(define-coding-system 'iso-latin-2
  "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."
- '(ascii latin-iso8859-2 nil nil
-   nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-2)
-   (mime-charset . iso-8859-2)))
+  :coding-type 'charset
+  :mnemonic ?2
+  :charset-list '(iso-8859-2)
+  :mime-charset 'iso-8859-2)
 
 (define-coding-system-alias 'iso-8859-2 'iso-latin-2)
 (define-coding-system-alias 'latin-2 'iso-latin-2)
 
 (set-language-info-alist
- "Latin-2" '((charset ascii latin-iso8859-2)
-            (coding-system iso-latin-2)
+ "Latin-2" '((charset iso-8859-2)
+            (coding-system iso-latin-2 windows-1250)
             (coding-priority iso-latin-2)
-            (nonascii-translation . latin-iso8859-2)
-            (unibyte-syntax . "latin-2")
+            (nonascii-translation . iso-8859-2)
             (unibyte-display . iso-latin-2)
             (input-method . "latin-2-prefix")
             (documentation . "\
@@ -112,6 +96,7 @@
 We also have specific language environments for the following languages:
   For Czech, \"Czech\".
   For Croatian, \"Croatian\".
+  For Polish, \"Polish\".
   For Romanian, \"Romanian\".
   For Slovak, \"Slovak\"."))
  '("European"))
@@ -119,23 +104,21 @@
 
 ;; Latin-3 (ISO-8859-3)
 
-(make-coding-system
- 'iso-latin-3 2 ?3
+(define-coding-system 'iso-latin-3
  "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."
- '(ascii latin-iso8859-3 nil nil
-   nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-3)
-   (mime-charset . iso-8859-3)))
+  :coding-type 'charset
+  :mnemonic ?3
+  :charset-list '(iso-8859-3)
+  :mime-charset 'iso-8859-3)
 
 (define-coding-system-alias 'iso-8859-3 'iso-latin-3)
 (define-coding-system-alias 'latin-3 'iso-latin-3)
 
 (set-language-info-alist
- "Latin-3" '((charset ascii latin-iso8859-3)
+ "Latin-3" '((charset iso-8859-3)
             (coding-system iso-latin-3)
             (coding-priority iso-latin-3)
-            (nonascii-translation . latin-iso8859-3)
-            (unibyte-syntax . "latin-3")
+            (nonascii-translation . iso-8859-3)
             (unibyte-display . iso-latin-3)
             (input-method . "latin-3-prefix")
             (documentation . "\
@@ -147,23 +130,21 @@
 
 ;; Latin-4 (ISO-8859-4)
 
-(make-coding-system
- 'iso-latin-4 2 ?4
+(define-coding-system 'iso-latin-4
  "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."
- '(ascii latin-iso8859-4 nil nil
-   nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-4)
-   (mime-charset . iso-8859-4)))
+  :coding-type 'charset
+  :mnemonic ?4
+  :charset-list '(iso-8859-4)
+  :mime-charset 'iso-8859-4)
 
 (define-coding-system-alias 'iso-8859-4 'iso-latin-4)
 (define-coding-system-alias 'latin-4 'iso-latin-4)
 
 (set-language-info-alist
- "Latin-4" '((charset ascii latin-iso8859-4)
+ "Latin-4" '((charset iso-8859-4)
             (coding-system iso-8859-4)
             (coding-priority iso-8859-4)
-            (nonascii-translation . latin-iso8859-4)
-            (unibyte-syntax . "latin-4")
+            (nonascii-translation . iso-8859-4)
             (unibyte-display . iso-8859-4)
             (input-method . "latin-4-postfix")
             (documentation . "\
@@ -175,53 +156,95 @@
 
 ;; Latin-5 (ISO-8859-9)
 
-(make-coding-system
- 'iso-latin-5 2 ?9
+(define-coding-system 'iso-latin-5
  "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."
- '(ascii latin-iso8859-9 nil nil
-   nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-9)
-   (mime-charset . iso-8859-9)))
+  :coding-type 'charset
+  :mnemonic ?9
+  :charset-list '(iso-8859-9)
+  :mime-charset 'iso-8859-9)
 
 (define-coding-system-alias 'iso-8859-9 'iso-latin-5)
 (define-coding-system-alias 'latin-5 'iso-latin-5)
 
 (set-language-info-alist
- "Latin-5" '((charset ascii latin-iso8859-9)
+ "Latin-5" '((charset iso-8859-9)
             (coding-system iso-latin-5)
             (coding-priority iso-latin-5)
-            (nonascii-translation . latin-iso8859-9)
-            (unibyte-syntax . "latin-5")
+            (nonascii-translation . iso-8859-9)
             (unibyte-display . iso-latin-5)
             (input-method . "latin-5-postfix")
-            (documentation . "Support for Turkish language."))
+            (documentation . "Support for Latin-5.\
+See also the Turkish environment."))
+ '("European"))
+
+
+;; Latin-6 (ISO-8859-10)
+
+(define-coding-system 'iso-latin-6
+  "ISO 2022 based 8-bit encoding for Latin-6 (MIME:ISO-8859-10)."
+  :coding-type 'charset
+  :mnemonic ?9
+  :charset-list '(iso-8859-10)
+  :mime-charset 'iso-8859-10)
+
+(define-coding-system-alias 'iso-8859-10 'iso-latin-6)
+(define-coding-system-alias 'latin-6 'iso-latin-6)
+
+(set-language-info-alist
+ "Latin-6" '((charset iso-8859-10)
+            (coding-system iso-latin-6)
+            (coding-priority iso-latin-6)
+            (nonascii-translation . iso-8859-10)
+            (unibyte-display . iso-latin-6)
+            ;; Fixme: input method.
+            (documentation . "Support for generic Latin-6 (Northern 
European)."))
  '("European"))
 
 
+;; Latin-7 (ISO-8859-13)
+
+(define-coding-system 'iso-latin-7
+  "ISO 2022 based 8-bit encoding for Latin-7 (MIME:ISO-8859-13)."
+  :coding-type 'charset
+  :mnemonic ?9
+  :charset-list '(iso-8859-13)
+  :mime-charset 'iso-8859-13)
+
+(define-coding-system-alias 'iso-8859-13 'iso-latin-7)
+(define-coding-system-alias 'latin-7 'iso-latin-7)
+
+(set-language-info-alist
+ "Latin-7" '((charset iso-8859-13)
+            (coding-system iso-latin-7)
+            (coding-priority iso-latin-7)
+            (nonascii-translation . iso-8859-13)
+            (unibyte-display . iso-latin-7)
+            ;; Fixme: input method.
+            (documentation . "Support for generic Latin-7 (Baltic Rim)."))
+ '("European"))
+
 ;; Latin-8 (ISO-8859-14)
 
-(make-coding-system
- 'iso-latin-8 2 ?W                     ; `W' for `Welsh', since `C'
-                                       ; for `Celtic' is taken.
+(define-coding-system 'iso-latin-8
  "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."
- '(ascii latin-iso8859-14 nil nil
-   nil nil nil nil nil nil nil nil nil nil nil t t)
- '((safe-charsets ascii latin-iso8859-14)
-   (mime-charset . iso-8859-14)))
+  :coding-type 'charset
+  ;; `W' for `Welsh', since `C' for `Celtic' is taken.
+  :mnemonic ?W                         
+  :charset-list '(iso-8859-14)
+  :mime-charset 'iso-8859-14)
 
 (define-coding-system-alias 'iso-8859-14 'iso-latin-8)
 (define-coding-system-alias 'latin-8 'iso-latin-8)
 
 (set-language-info-alist
- "Latin-8" '((charset ascii latin-iso8859-14)
+ "Latin-8" '((charset iso-8859-14)
             (coding-system iso-latin-8)
             (coding-priority iso-latin-8)
-            (nonascii-translation . latin-iso8859-14)
-            (unibyte-syntax . "latin-8")
+            (nonascii-translation . iso-8859-14)
             (unibyte-display . iso-latin-8)
             (input-method . "latin-8-prefix")
             ;; Fixme: Welsh/Ga{e}lic greetings
-            (sample-text . ",_"(B ,_p(B ,_^(B")
+            (sample-text . ",_"(B $(D+q(B $(D*t(B")
             (documentation . "\
 This language environment is a generic one for the Latin-8 (ISO-8859-14)
 character set which supports the Celtic languages, including those not
@@ -231,28 +254,27 @@
 
 ;; Latin-9 (ISO-8859-15)
 
-(make-coding-system
- 'iso-latin-9 2 ?0                     ; `0' for `Latin-0'
+(define-coding-system 'iso-latin-9
  "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."
- '(ascii latin-iso8859-15 nil nil
-   nil nil nil nil nil nil nil nil nil nil nil t t)
- '((safe-charsets ascii latin-iso8859-15)
-   (mime-charset . iso-8859-15)))
+  :coding-type 'charset
+  ;; `0' for `Latin-0'
+  :mnemonic ?0
+  :charset-list '(iso-8859-15)
+  :mime-charset 'iso-8859-15)
 
 (define-coding-system-alias 'iso-8859-15 'iso-latin-9)
 (define-coding-system-alias 'latin-9 'iso-latin-9)
 (define-coding-system-alias 'latin-0 'iso-latin-9)
 
 (set-language-info-alist
- "Latin-9" '((charset ascii latin-iso8859-15)
+ "Latin-9" '((charset iso-8859-15)
             (coding-system iso-latin-9)
             (coding-priority iso-latin-9)
-            (nonascii-translation . latin-iso8859-15)
-            (unibyte-syntax . "latin-9")
+            (nonascii-translation . iso-8859-15)
             (unibyte-display . iso-latin-9)
             (input-method . "latin-9-prefix")
             (sample-text
-             . "AVE. ,b&(48<=>(B ,b$(B")
+             . "AVE. $(D*^+^*v+v)-)M*s(B $(Q)!(B")
             (documentation . "\
 This language environment is a generic one for the Latin-9 (ISO-8859-15)
 character set which supports the same languages as Latin-1 with the
@@ -261,12 +283,127 @@
  '("European"))
 
 (set-language-info-alist
+ "Esperanto" '((tutorial . "TUTORIAL.eo")
+              (charset ascii latin-iso8859-3)
+              (coding-system iso-latin-3)
+              (coding-priority iso-latin-3)
+              (nonascii-translation . latin-iso8859-3)
+              (unibyte-syntax . "latin-3")
+              (unibyte-display . iso-latin-3)
+              (input-method . "latin-3-prefix")
+              (documentation . "Support for Esperanto with ISO-8859-3 
character set."))
+ '("European"))
+
+
+(define-coding-system 'windows-1250
+  "windows-1250 (Central European) encoding (MIME: WINDOWS-1250)"
+  :coding-type 'charset
+  :mnemonic ?*
+  :charset-list '(windows-1250)
+  :mime-charset 'windows-1250)
+(define-coding-system-alias 'cp1250 'windows-1250)
+
+(define-coding-system 'windows-1252
+  "windows-1252 (Western European) encoding (MIME: WINDOWS-1252)"
+  :coding-type 'charset
+  :mnemonic ?*
+  :charset-list '(windows-1252)
+  :mime-charset 'windows-1252)
+(define-coding-system-alias 'cp1252 'windows-1252)
+
+(define-coding-system 'windows-1254
+  "windows-1254 (Turkish) encoding (MIME: WINDOWS-1254)"
+  :coding-type 'charset
+  :mnemonic ?*
+  :charset-list '(windows-1254)
+  :mime-charset 'windows-1254)
+(define-coding-system-alias 'cp1254 'windows-1254)
+
+(define-coding-system 'windows-1257
+  "windows-1257 (Baltic) encoding (MIME: WINDOWS-1257)"
+  :coding-type 'charset
+  :mnemonic ?*
+  :charset-list '(windows-1257)
+  :mime-charset 'windows-1257)
+(define-coding-system-alias 'cp1257 'windows-1257)
+
+(define-coding-system 'cp850
+  "DOS codepage 850 (Western European)"
+  :coding-type 'charset
+  :mnemonic ?D
+  :charset-list '(cp850)
+  :mime-charset 'cp850)
+(define-coding-system-alias 'ibm850 'cp850)
+
+(define-coding-system 'cp852
+  "DOS codepage 852 (Slavic)"
+  :coding-type 'charset
+  :mnemonic ?D
+  :charset-list '(cp852)
+  :mime-charset 'cp852)
+(define-coding-system-alias 'ibm852 'cp852)
+
+(define-coding-system 'cp857
+  "DOS codepage 857 (Turkish)"
+  :coding-type 'charset
+  :mnemonic ?D
+  :charset-list '(cp857)
+  :mime-charset 'cp857)
+(define-coding-system-alias 'ibm857 'cp857)
+
+(define-coding-system 'cp858
+  "Codepage 858 (Multilingual Latin I + Euro)"
+  :coding-type 'charset
+  :mnemonic ?D
+  :charset-list '(cp858)
+  :mime-charset 'cp858)
+
+(define-coding-system 'cp860
+  "DOS codepage 860 (Portuguese)"
+  :coding-type 'charset
+  :mnemonic ?D
+  :charset-list '(cp860)
+  :mime-charset 'cp860)
+(define-coding-system-alias 'ibm860 'cp860)
+
+(define-coding-system 'cp861
+  "DOS codepage 861 (Icelandic)"
+  :coding-type 'charset
+  :mnemonic ?D
+  :charset-list '(cp861)
+  :mime-charset 'cp861)
+(define-coding-system-alias 'ibm861 'cp861)
+
+(define-coding-system 'cp863
+  "DOS codepage 863 (French Canadian)"
+  :coding-type 'charset
+  :mnemonic ?D
+  :charset-list '(cp863)
+  :mime-charset 'cp863)
+(define-coding-system-alias 'ibm863 'cp863)
+
+(define-coding-system 'cp865
+  "DOS codepage 865 (Norwegian/Danish)"
+  :coding-type 'charset
+  :mnemonic ?D
+  :charset-list '(cp865)
+  :mime-charset 'cp865)
+(define-coding-system-alias 'ibm865 'cp865)
+
+(define-coding-system 'cp437
+  "DOS codepage 437"
+  :coding-type 'charset
+  :mnemonic ?D
+  :charset-list '(cp437)
+  :mime-charset 'cp437)
+(define-coding-system-alias 'ibm437 'cp437)
+
+(set-language-info-alist
  "Dutch" '((tutorial . "TUTORIAL.nl")
-          (charset ascii latin-iso8859-1)
+          (charset iso-8859-1)
           (coding-system iso-latin-1 iso-latin-9)
           (coding-priority iso-latin-1)
-          (nonascii-translation . latin-iso8859-1)
-          (unibyte-syntax . "latin-1")
+          (nonascii-translation . iso-8859-1)
           (unibyte-display . iso-latin-1)
           (input-method . "dutch")
           (sample-text . "Er is een aantal manieren waarop je dit kan doen")
@@ -277,16 +414,15 @@
 
 (set-language-info-alist
  "German" '((tutorial . "TUTORIAL.de")
-           (charset ascii latin-iso8859-1)
+           (charset iso-8859-1)
            (coding-system iso-latin-1 iso-latin-9)
-           (coding-priority iso-latin-1 windows-1252)
+           (coding-priority iso-latin-1)
+           (nonascii-translation . iso-8859-1)
            (input-method . "german-postfix")
-           (nonascii-translation . latin-iso8859-1)
-           (unibyte-syntax . "latin-1")
            (unibyte-display . iso-latin-1)
            (sample-text . "\
 German (Deutsch Nord)  Guten Tag
-German (Deutsch S,A|(Bd)     Gr,A|_(B Gott")
+German (Deutsch S$(D+d(Bd)   Gr$(D+d)N(B Gott")
            (documentation . "\
 This language environment is almost the same as Latin-1,
 but sets the default input method to \"german-postfix\".
@@ -295,14 +431,13 @@
 
 (set-language-info-alist
  "French" '((tutorial . "TUTORIAL.fr")
-           (charset ascii latin-iso8859-1)
+           (charset iso-8859-1)
            (coding-system iso-latin-1 iso-latin-9)
            (coding-priority iso-latin-1)
-           (nonascii-translation . latin-iso8859-1)
-           (unibyte-syntax . "latin-1")
+           (nonascii-translation . iso-8859-1)
            (unibyte-display . iso-latin-1)
            (input-method . "latin-1-prefix")
-           (sample-text . "French (Fran,Ag(Bais)     Bonjour, Salut")
+           (sample-text . "French (Fran$(D+.(Bais)   Bonjour, Salut")
            (documentation . "\
 This language environment is almost the same as Latin-1,
 but it selects the French tutorial and input method."))
@@ -310,11 +445,10 @@
 
 (set-language-info-alist
  "Italian" '((tutorial . "TUTORIAL.it")
-           (charset ascii latin-iso8859-1)
+           (charset iso-8859-1)
            (coding-system iso-latin-1 iso-latin-9)
            (coding-priority iso-latin-1)
-           (nonascii-translation . latin-iso8859-1)
-           (unibyte-syntax . "latin-1")
+           (nonascii-translation . iso-8859-1)
            (unibyte-display . iso-latin-1)
            (input-method . "italian-postfix")
            (sample-text . "Salve, ciao!")
@@ -325,15 +459,14 @@
  '("European"))
 
 (set-language-info-alist
- "Slovenian" '((charset . (ascii latin-iso8859-2))
-             (coding-system . (iso-8859-2))
+ "Slovenian" '((charset iso-8859-2)
+             (coding-system . (iso-8859-2 windows-1250))
              (coding-priority . (iso-8859-2))
-             (nonascii-translation . latin-iso8859-2)
+             (nonascii-translation . iso-8859-2)
              (input-method . "slovenian")
-             (unibyte-syntax . "latin-2")
              (unibyte-display . iso-8859-2)
              (tutorial . "TUTORIAL.sl")
-             (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!")
+             (sample-text . "$(D*v(Belimo vam uspe$(D+^(Ben dan!")
              (documentation . "\
 This language environment is almost the same as Latin-2,
 but it selects the Slovenian tutorial and input method."))
@@ -341,14 +474,13 @@
 
 (set-language-info-alist
  "Spanish" '((tutorial . "TUTORIAL.es")
-           (charset ascii latin-iso8859-1)
+           (charset iso-8859-1)
            (coding-system iso-latin-1 iso-latin-9)
            (coding-priority iso-latin-1)
            (input-method . "spanish-postfix")
-           (nonascii-translation . latin-iso8859-1)
-           (unibyte-syntax . "latin-1")
+           (nonascii-translation . iso-8859-1)
            (unibyte-display . iso-latin-1)
-           (sample-text . "Spanish (Espa,Aq(Bol)     ,A!(BHola!")
+           (sample-text . "Spanish (Espa$(D+P(Bol)   $(D"B(BHola!")
            (documentation . "\
 This language environment is almost the same as Latin-1,
 but it sets the default input method to \"spanish-postfix\",
@@ -361,52 +493,52 @@
 ;; "Latin-3" language environment.
 
 (set-language-info-alist
- "Turkish" '((charset ascii latin-iso8859-9)
-            (coding-system iso-latin-5 iso-latin-3)
+ "Turkish" '((charset iso-8859-9)
+            (coding-system iso-latin-5 windows-1254 iso-latin-3)
             (coding-priority iso-latin-5)
-            (nonascii-translation . latin-iso8859-9)
-            (unibyte-syntax . "latin-5")
+            (nonascii-translation . iso-8859-9)
             (unibyte-display . iso-latin-5)
             (input-method . "turkish-postfix")
-            (sample-text . "Turkish (T,M|(Brk,Mg(Be)       Merhaba")
-            (documentation . t)
+            (sample-text . "Turkish (T$(D+d(Brk$(D+.(Be)   Merhaba")
             (setup-function . turkish-case-conversion-enable)
-            (exit-function . turkish-case-conversion-disable)))
+            (setup-function . turkish-case-conversion-disable)
+            (documentation . "Support for Turkish.
+Differs from the Latin-5 environment in using the `turkish-postfix' input
+method and applying Turkish case rules for the characters i, I, $(D)E(B, 
$(D*D(B.")))
 
 (defun turkish-case-conversion-enable ()
-  "Set up Turkish case conversion of `i' and `I' into `$,1 P(B' and `$,1 
Q(B'."
+  "Set up Turkish case conversion of `i' and `I' into `$(D*D(B' and 
`$(D)E(B'."
   (let ((table (standard-case-table)))
-    (set-case-syntax-pair ?$,1 P(B ?i table)
-    (set-case-syntax-pair ?I ?$,1 Q(B table)))
+    (set-case-syntax-pair ?$(D*D(B ?i table)
+    (set-case-syntax-pair ?I ?$(D)E(B table)))
 
 (defun turkish-case-conversion-disable ()
   "Set up normal (non-Turkish) case conversion of `i' into `I'."
   (let ((table (standard-case-table)))
     (set-case-syntax-pair ?I ?i table)
-    (set-case-syntax ?$,1 P(B "w" table)
-    (set-case-syntax ?$,1 Q(B "w" table)))
+    (set-case-syntax ?$(D*D(B "w" table)
+    (set-case-syntax ?$(D)E(B "w" table)))
 
 ;; Polish ISO 8859-2 environment.
 ;; Maintainer: Wlodek Bzyl <address@hidden>
 ;; Keywords: multilingual, Polish
 
 (set-language-info-alist
- "Polish" '((charset . (ascii latin-iso8859-2))
-          (coding-system . (iso-8859-2))
-          (coding-priority . (iso-8859-2))
+ "Polish" '((charset iso-8859-2)
+          (coding-system iso-8859-2 windows-1250)
+          (coding-priority iso-8859-2)
           (input-method . "polish-slash")
-          (nonascii-translation . latin-iso8859-2)
-          (unibyte-syntax . "latin-2")
+          (nonascii-translation . iso-8859-2)
           (unibyte-display . iso-8859-2)
           (tutorial . "TUTORIAL.pl")
-          (sample-text . "P,Bs(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B 
chmurno,B6f(B w g,B31(Bb flaszy")
+          (sample-text . "P$(D+Q(Bjd$(D+u(B, ki$(D+M(B-$(D+w(Be 
t$(D+8(B chmurno$(D+\++(B w g$(D)H+((Bb flaszy")
           (documentation . t))
  '("European"))
 
 (set-language-info-alist
  "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based
           (coding-priority utf-8 latin-8)
-          (nonascii-translation . latin-iso8859-14)
+          (nonascii-translation . iso-8859-14)
           (input-method . "welsh")
           (documentation . "Support for Welsh, using Unicode."))
  '("European"))
@@ -423,270 +555,130 @@
 (set-language-info-alist
  "Latin-7" `((coding-system latin-7)
             (coding-priority latin-7)
-            (nonascii-translation . ,(get 'decode-iso-latin-7
-                                          'translation-table))
+            (nonascii-translation . iso-8859-13)
             (input-method . "latin-prefix")
-            (features code-pages)
             (documentation . "Support for Latin-7, e.g. Latvian, Lithuanian."))
  '("European"))
 
 (set-language-info-alist
- "Lithuanian" `((coding-system latin-7)
+ "Lithuanian" `((coding-system latin-7 windows-1257)
                (coding-priority latin-7)
+               (nonascii-translation . iso-8859-13)
                (input-method . "lithuanian-keyboard")
-               (nonascii-translation . ,(get 'decode-iso-latin-7
-                                             'translation-table))
-               (features code-pages)
                (documentation . "Support for Lithuanian."))
  '("European"))
 
 (set-language-info-alist
- "Latvian" `((coding-system latin-7)
+ "Latvian" `((coding-system latin-7 windows-1257)
             (coding-priority latin-7)
+            (nonascii-translation . iso-8859-13)
             (input-method . "latvian-keyboard")
-            (nonascii-translation . ,(get 'decode-iso-latin-7
-                                          'translation-table))
-            (features code-pages)
             (documentation . "Support for Latvian."))
  '("European"))
 
 (set-language-info-alist
  "Swedish" '((tutorial . "TUTORIAL.sv")
-           (charset ascii latin-iso8859-1)
+           (charset iso-8859-1)
            (coding-system iso-latin-1)
            (coding-priority iso-latin-1)
-           (nonascii-translation . latin-iso8859-1)
-           (unibyte-syntax . "latin-1")
+           (nonascii-translation . iso-8859-1)
            (unibyte-display . iso-latin-1)
            (sample-text . "Goddag Hej")
            (documentation . "Support for Swedish"))
  '("European"))
 
 (set-language-info-alist
- "Croatian" '((charset . (ascii latin-iso8859-2))
-             (coding-system . (iso-8859-2))
-             (coding-priority . (iso-8859-2))
+ "Croatian" '((charset iso-8859-2)
+             (coding-system iso-8859-2)
+             (coding-priority iso-8859-2)
              (input-method . "croatian")
-             (nonascii-translation . latin-iso8859-2)
-             (unibyte-syntax . "latin-2")
+             (nonascii-translation . iso-8859-2)
              (unibyte-display . iso-8859-2)
              (documentation . "Support for Croatian with Latin-2 encoding."))
  '("European"))
 
 (set-language-info-alist
  "Brazilian Portuguese" '((tutorial . "TUTORIAL.pt_BR")
-           (charset ascii latin-iso8859-1)
+           (charset iso-8859-1)
            (coding-system iso-latin-1 iso-latin-9)
            (coding-priority iso-latin-1)
-           (nonascii-translation . latin-iso8859-1)
-           (unibyte-syntax . "latin-1")
-           (unibyte-display . iso-latin-1)
+           (nonascii-translation . iso-8859-1)
+           (unibyte-display . iso-8859-1)
            (input-method . "latin-1-prefix")
            (sample-text . "Oi")
            (documentation . "Support for Brazilian Portuguese."))
  '("European"))
 
-(set-language-info-alist
- "Esperanto" '((tutorial . "TUTORIAL.eo")
-              (charset ascii latin-iso8859-3)
-              (coding-system iso-latin-3)
-              (coding-priority iso-latin-3)
-              (nonascii-translation . latin-iso8859-3)
-              (unibyte-syntax . "latin-3")
-              (unibyte-display . iso-latin-3)
-              (input-method . "latin-3-prefix")
-              (documentation . "Support for Esperanto with ISO-8859-3 
character set."))
- '("European"))
-
-
-;; Definitions for the Mac Roman character sets and coding system.
-;; The Mac Roman encoding uses all 128 code points in the range 128 to
-;; 255 for actual characters.  Emacs decodes them to one of the
-;; following character sets.
-;;     ascii, latin-iso8859-1, mule-unicode-0100-24ff,
-;;     mule-unicode-2500-33ff, mule-unicode-e000-ffff
-
-(let
-    ((encoding-vector (make-vector 256 nil))
-     (i 0)
-     (vec      ;; mac-roman (128..255) -> UCS mapping
-      [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS
-       #x00C5  ;; 129:LATIN CAPITAL LETTER A WITH RING ABOVE
-       #x00C7  ;; 130:LATIN CAPITAL LETTER C WITH CEDILLA
-       #x00C9  ;; 131:LATIN CAPITAL LETTER E WITH ACUTE
-       #x00D1  ;; 132:LATIN CAPITAL LETTER N WITH TILDE
-       #x00D6  ;; 133:LATIN CAPITAL LETTER O WITH DIAERESIS
-       #x00DC  ;; 134:LATIN CAPITAL LETTER U WITH DIAERESIS
-       #x00E1  ;; 135:LATIN SMALL LETTER A WITH ACUTE
-       #x00E0  ;; 136:LATIN SMALL LETTER A WITH GRAVE
-       #x00E2  ;; 137:LATIN SMALL LETTER A WITH CIRCUMFLEX
-       #x00E4  ;; 138:LATIN SMALL LETTER A WITH DIAERESIS
-       #x00E3  ;; 139:LATIN SMALL LETTER A WITH TILDE
-       #x00E5  ;; 140:LATIN SMALL LETTER A WITH RING ABOVE
-       #x00E7  ;; 141:LATIN SMALL LETTER C WITH CEDILLA
-       #x00E9  ;; 142:LATIN SMALL LETTER E WITH ACUTE
-       #x00E8  ;; 143:LATIN SMALL LETTER E WITH GRAVE
-       #x00EA  ;; 144:LATIN SMALL LETTER E WITH CIRCUMFLEX
-       #x00EB  ;; 145:LATIN SMALL LETTER E WITH DIAERESIS
-       #x00ED  ;; 146:LATIN SMALL LETTER I WITH ACUTE
-       #x00EC  ;; 147:LATIN SMALL LETTER I WITH GRAVE
-       #x00EE  ;; 148:LATIN SMALL LETTER I WITH CIRCUMFLEX
-       #x00EF  ;; 149:LATIN SMALL LETTER I WITH DIAERESIS
-       #x00F1  ;; 150:LATIN SMALL LETTER N WITH TILDE
-       #x00F3  ;; 151:LATIN SMALL LETTER O WITH ACUTE
-       #x00F2  ;; 152:LATIN SMALL LETTER O WITH GRAVE
-       #x00F4  ;; 153:LATIN SMALL LETTER O WITH CIRCUMFLEX
-       #x00F6  ;; 154:LATIN SMALL LETTER O WITH DIAERESIS
-       #x00F5  ;; 155:LATIN SMALL LETTER O WITH TILDE
-       #x00FA  ;; 156:LATIN SMALL LETTER U WITH ACUTE
-       #x00F9  ;; 157:LATIN SMALL LETTER U WITH GRAVE
-       #x00FB  ;; 158:LATIN SMALL LETTER U WITH CIRCUMFLEX
-       #x00FC  ;; 159:LATIN SMALL LETTER U WITH DIAERESIS
-       #x2020  ;; 160:DAGGER
-       #x00B0  ;; 161:DEGREE SIGN
-       #x00A2  ;; 162:CENT SIGN
-       #x00A3  ;; 163:POUND SIGN
-       #x00A7  ;; 164:SECTION SIGN
-       #x2022  ;; 165:BULLET
-       #x00B6  ;; 166:PILCROW SIGN
-       #x00DF  ;; 167:LATIN SMALL LETTER SHARP S
-       #x00AE  ;; 168:REGISTERED SIGN
-       #x00A9  ;; 169:COPYRIGHT SIGN
-       #x2122  ;; 170:TRADE MARK SIGN
-       #x00B4  ;; 171:ACUTE ACCENT
-       #x00A8  ;; 172:DIAERESIS
-       #x2260  ;; 173:NOT EQUAL TO
-       #x00C6  ;; 174:LATIN CAPITAL LETTER AE
-       #x00D8  ;; 175:LATIN CAPITAL LETTER O WITH STROKE
-       #x221E  ;; 176:INFINITY
-       #x00B1  ;; 177:PLUS-MINUS SIGN
-       #x2264  ;; 178:LESS-THAN OR EQUAL TO
-       #x2265  ;; 179:GREATER-THAN OR EQUAL TO
-       #x00A5  ;; 180:YEN SIGN
-       #x00B5  ;; 181:MICRO SIGN
-       #x2202  ;; 182:PARTIAL DIFFERENTIAL
-       #x2211  ;; 183:N-ARY SUMMATION
-       #x220F  ;; 184:N-ARY PRODUCT
-       #x03C0  ;; 185:GREEK SMALL LETTER PI
-       #x222B  ;; 186:INTEGRAL
-       #x00AA  ;; 187:FEMININE ORDINAL INDICATOR
-       #x00BA  ;; 188:MASCULINE ORDINAL INDICATOR
-       #x03A9  ;; 189:GREEK CAPITAL LETTER OMEGA
-       #x00E6  ;; 190:LATIN SMALL LETTER AE
-       #x00F8  ;; 191:LATIN SMALL LETTER O WITH STROKE
-       #x00BF  ;; 192:INVERTED QUESTION MARK
-       #x00A1  ;; 193:INVERTED EXCLAMATION MARK
-       #x00AC  ;; 194:NOT SIGN
-       #x221A  ;; 195:SQUARE ROOT
-       #x0192  ;; 196:LATIN SMALL LETTER F WITH HOOK
-       #x2248  ;; 197:ALMOST EQUAL TO
-       #x2206  ;; 198:INCREMENT
-       #x00AB  ;; 199:LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
-       #x00BB  ;; 200:RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-       #x2026  ;; 201:HORIZONTAL ELLIPSIS
-       #x00A0  ;; 202:NO-BREAK SPACE
-       #x00C0  ;; 203:LATIN CAPITAL LETTER A WITH GRAVE
-       #x00C3  ;; 204:LATIN CAPITAL LETTER A WITH TILDE
-       #x00D5  ;; 205:LATIN CAPITAL LETTER O WITH TILDE
-       #x0152  ;; 206:LATIN CAPITAL LIGATURE OE
-       #x0153  ;; 207:LATIN SMALL LIGATURE OE
-       #x2013  ;; 208:EN DASH
-       #x2014  ;; 209:EM DASH
-       #x201C  ;; 210:LEFT DOUBLE QUOTATION MARK
-       #x201D  ;; 211:RIGHT DOUBLE QUOTATION MARK
-       #x2018  ;; 212:LEFT SINGLE QUOTATION MARK
-       #x2019  ;; 213:RIGHT SINGLE QUOTATION MARK
-       #x00F7  ;; 214:DIVISION SIGN
-       #x25CA  ;; 215:LOZENGE
-       #x00FF  ;; 216:LATIN SMALL LETTER Y WITH DIAERESIS
-       #x0178  ;; 217:LATIN CAPITAL LETTER Y WITH DIAERESIS
-       #x2044  ;; 218:FRACTION SLASH
-       #x20AC  ;; 219:EURO SIGN
-       #x2039  ;; 220:SINGLE LEFT-POINTING ANGLE QUOTATION MARK
-       #x203A  ;; 221:SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
-       #xFB01  ;; 222:LATIN SMALL LIGATURE FI
-       #xFB02  ;; 223:LATIN SMALL LIGATURE FL
-       #x2021  ;; 224:DOUBLE DAGGER
-       #x00B7  ;; 225:MIDDLE DOT
-       #x201A  ;; 226:SINGLE LOW-9 QUOTATION MARK
-       #x201E  ;; 227:DOUBLE LOW-9 QUOTATION MARK
-       #x2030  ;; 228:PER MILLE SIGN
-       #x00C2  ;; 229:LATIN CAPITAL LETTER A WITH CIRCUMFLEX
-       #x00CA  ;; 230:LATIN CAPITAL LETTER E WITH CIRCUMFLEX
-       #x00C1  ;; 231:LATIN CAPITAL LETTER A WITH ACUTE
-       #x00CB  ;; 232:LATIN CAPITAL LETTER E WITH DIAERESIS
-       #x00C8  ;; 233:LATIN CAPITAL LETTER E WITH GRAVE
-       #x00CD  ;; 234:LATIN CAPITAL LETTER I WITH ACUTE
-       #x00CE  ;; 235:LATIN CAPITAL LETTER I WITH CIRCUMFLEX
-       #x00CF  ;; 236:LATIN CAPITAL LETTER I WITH DIAERESIS
-       #x00CC  ;; 237:LATIN CAPITAL LETTER I WITH GRAVE
-       #x00D3  ;; 238:LATIN CAPITAL LETTER O WITH ACUTE
-       #x00D4  ;; 239:LATIN CAPITAL LETTER O WITH CIRCUMFLEX
-       #xF8FF  ;; 240:Apple logo
-       #x00D2  ;; 241:LATIN CAPITAL LETTER O WITH GRAVE
-       #x00DA  ;; 242:LATIN CAPITAL LETTER U WITH ACUTE
-       #x00DB  ;; 243:LATIN CAPITAL LETTER U WITH CIRCUMFLEX
-       #x00D9  ;; 244:LATIN CAPITAL LETTER U WITH GRAVE
-       #x0131  ;; 245:LATIN SMALL LETTER DOTLESS I
-       #x02C6  ;; 246:MODIFIER LETTER CIRCUMFLEX ACCENT
-       #x02DC  ;; 247:SMALL TILDE
-       #x00AF  ;; 248:MACRON
-       #x02D8  ;; 249:BREVE
-       #x02D9  ;; 250:DOT ABOVE
-       #x02DA  ;; 251:RING ABOVE
-       #x00B8  ;; 252:CEDILLA
-       #x02DD  ;; 253:DOUBLE ACUTE ACCENT
-       #x02DB  ;; 254:OGONEK
-       #x02C7  ;; 255:CARON
-       ])
-     translation-table)
-  (while (< i 128)
-    (aset encoding-vector i i)
-    (setq i (1+ i)))
-  (while (< i 256)
-    (aset encoding-vector i
-         (decode-char 'ucs (aref vec (- i 128))))
-    (setq i (1+ i)))
-  (setq translation-table
-       (make-translation-table-from-vector encoding-vector))
-  (define-translation-table 'mac-roman-decoder translation-table)
-  (define-translation-table 'mac-roman-encoder
-    (char-table-extra-slot translation-table 0)))
-
-(define-ccl-program decode-mac-roman
-  `(4
-    ((loop
-      (read r1)
-      (if (r1 < 128)  ;; ASCII
-         (r0 = ,(charset-id 'ascii))
-       (if (r1 < 160)
-           (r0 = ,(charset-id 'eight-bit-control))
-         (r0 = ,(charset-id 'eight-bit-graphic))))
-      (translate-character mac-roman-decoder r0 r1)
-      (write-multibyte-character r0 r1)
-      (repeat))))
-  "CCL program to decode Mac Roman")
-
-(define-ccl-program encode-mac-roman
-  `(1
-    ((loop
-      (read-multibyte-character r0 r1)
-      (translate-character ucs-mule-to-mule-unicode r0 r1)
-      (translate-character mac-roman-encoder r0 r1)
-      (if (r0 != ,(charset-id 'ascii))
-         (if (r0 != ,(charset-id 'eight-bit-graphic))
-             (if (r0 != ,(charset-id 'eight-bit-control))
-                 (r1 = ??))))
-      (write-repeat r1))))
-  "CCL program to encode Mac Roman")
 
-(make-coding-system
- 'mac-roman 4 ?M
+(define-coding-system 'mac-roman
  "Mac Roman Encoding (MIME:MACINTOSH)."
- '(decode-mac-roman . encode-mac-roman)
- (list (cons 'safe-chars (get 'mac-roman-encoder 'translation-table))
-       '(valid-codes (0 . 255))
-       '(mime-charset . macintosh)))           ; per IANA, rfc1345
+  :coding-type 'charset
+  :mnemonic ?M 
+  :charset-list '(mac-roman)
+  :mime-charset 'macintosh)
+
+(define-coding-system 'next
+  "NeXTstep encoding"
+  :coding-type 'charset
+  :mnemonic ?*
+  :charset-list '(next)
+  :mime-charset 'next)
+
+(define-coding-system 'hp-roman8
+  "Hewlet-Packard roman-8 encoding (MIME:ROMAN-8)"
+  :coding-type 'charset
+  :mnemonic ?*
+  :charset-list '(hp-roman8)
+  :mime-charset 'hp-roman8)
+(define-coding-system-alias 'roman8 'hp-roman8)
+
+(define-coding-system 'adobe-standard-encoding
+  "Adobe `standard' encoding for PostScript"
+  :coding-type 'charset
+  :mnemonic ?*
+  :charset-list '(adobe-standard-encoding)
+  :mime-charset 'adobe-standard-encoding)
+
+
+;; For automatic composing of diacritics and combining marks.
+(dolist (range '( ;; combining diacritical marks
+                (#x0300 #x0314 (tc . bc))
+                (#x0315        (tr . bl))
+                (#x0316 #x0319 (bc . tc))
+                (#x031A        (tr . cl))
+                (#x031B #x0320 (bc . tc))
+                (#x0321        (Br . tr))
+                (#x0322        (Br . tl))
+                (#x0323 #x0333 (bc . tc))
+                (#x0334 #x0338 (Bc . Bc))
+                (#x0339 #x033C (bc . tc))
+                (#x033D #x033F (tc . bc))
+                (#x0340        (tl . bc))
+                (#x0341        (tr . bc))
+                (#x0342 #x0344 (tc . bc))
+                (#x0345        (bc . tc))
+                (#x0346        (tc . bc))
+                (#x0347 #x0349 (bc . tc))
+                (#x034A #x034C (tc . bc))
+                (#x034D #x034E (bc . tc))
+                ;; combining diacritical marks for symbols
+                (#x20D0 #x20D1 (tc . bc))
+                (#x20D2 #x20D3 (Bc . Bc))
+                (#x20D4 #x20D7 (tc . bc))
+                (#x20D8 #x20DA (Bc . Bc))
+                (#x20DB #x20DC (tc . bc))
+                (#x20DD #x20E0 (Bc . Bc))
+                (#x20E1        (tc . bc))
+                (#x20E2 #x20E3 (Bc . Bc))))
+  (let* ((from (car range))
+        (to (if (= (length range) 3)
+                (nth 1 range)
+              from))
+        (composition (car (last range))))
+    (while (<= from to)
+      (put-char-code-property from 'diacritic-composition composition)
+      (aset composition-function-table from 'diacritic-composition-function)
+      (setq from (1+ from)))))
 
 (defconst diacritic-composition-pattern "\\C^\\c^+")
 
@@ -699,13 +691,15 @@
     (narrow-to-region beg end)
     (goto-char (point-min))
     (while (re-search-forward diacritic-composition-pattern nil t)
-      (compose-region (match-beginning 0) (match-end 0)))))
+      (if (= (char-syntax (char-after (match-beginning 0))) ?w)
+         (compose-region (match-beginning 0) (match-end 0))))))
 
 (defun diacritic-compose-string (string)
   "Compose diacritic characters in STRING and return the resulting string."
   (let ((idx 0))
     (while (setq idx (string-match diacritic-composition-pattern string idx))
-      (compose-string string idx (match-end 0))
+      (if (= (char-syntax (aref string idx)) ?w)
+         (compose-string string idx (match-end 0)))
       (setq idx (match-end 0))))
   string)
 
@@ -714,33 +708,50 @@
   (interactive)
   (diacritic-compose-region (point-min) (point-max)))
 
-(defun diacritic-post-read-conversion (len)
-  (diacritic-compose-region (point) (+ (point) len))
-  len)
-
-(defun diacritic-composition-function (from to pattern &optional string)
-  "Compose diacritic text in the region FROM and TO.
-The text matches the regular expression PATTERN.
-Optional 4th argument STRING, if non-nil, is a string containing text
+(defun diacritic-composition-function (pos to font-object string)
+  "Compose diacritic text around POS.
+Optional 2nd argument STRING, if non-nil, is a string containing text
 to compose.
 
-The return value is the number of composed characters."
-  (when (< (1+ from) to)
+The return value is the end position of composed characters,
+or nil if no characters are composed."
+  (setq pos (1- pos))
       (if string
-         (compose-string string from to)
-       (compose-region from to))
-      (- to from)))
-
-;; Register a function to compose Unicode diacrtics and marks.
-(let ((patterns '(("\\C^\\c^+" . diacritic-composition-function))))
-  (let ((c #x300))
-    (while (<= c #x362)
-      (aset composition-function-table (decode-char 'ucs c) patterns)
-      (setq c (1+ c)))
-    (setq c #x20d0)
-    (while (<= c #x20e3)
-      (aset composition-function-table (decode-char 'ucs c) patterns)
-      (setq c (1+ c)))))
+      (if (>= pos 0)
+         (let ((ch (aref string pos))
+               start end components ch composition)
+           (when (= (char-syntax ch) ?w)
+             (setq start pos
+                   end (length string)
+                   components (list ch)
+                   pos (1+ pos))
+             (while (and
+                     (< pos end)
+                     (setq ch (aref string pos)
+                           composition
+                           (get-char-code-property ch
+                                                   'diacritic-composition)))
+               (setq components (cons ch (cons composition components))
+                     pos (1+ pos)))
+             (compose-string string start pos (nreverse components))
+             pos)))
+    (if (>= pos (point-min))
+       (let ((ch (char-after pos))
+             start end components composition)
+         (when (= (char-syntax ch) ?w)
+           (setq start pos
+                 end (point-max)
+                 components (list ch)
+                 pos (1+ pos))
+           (while (and
+                   (< pos end)
+                   (setq ch (char-after pos)
+                         composition
+                         (get-char-code-property ch 'diacritic-composition)))
+             (setq components (cons ch (cons composition components))
+                   pos (1+ pos)))
+           (compose-region start pos (nreverse components))
+           pos)))))
 
 (provide 'european)
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]