]> code.delx.au - gnu-emacs/blobdiff - lisp/language/european.el
(turkish-case-conversion-enable)
[gnu-emacs] / lisp / language / european.el
index 0719244b9500f29b157bb2516d851e5d878bd624..54d0f86aaf9e54052a68df9bdda14830ce4f65f4 100644 (file)
@@ -1,8 +1,10 @@
 ;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*-
 
-;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
-;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004
+;;   Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+;;   National Institute of Advanced Industrial Science and Technology (AIST)
+;;   Registration Number H14PRO021
 
 ;; Keywords: multilingual, European
 
@@ -20,8 +22,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -35,7 +37,7 @@
 (set-language-info-alist
  "Latin-1" '((charset ascii latin-iso8859-1)
             (coding-system iso-latin-1)
-            (coding-priority iso-latin-1)
+            (coding-priority iso-latin-1 windows-1252)
             (nonascii-translation . latin-iso8859-1)
             (unibyte-syntax . "latin-1")
             (unibyte-display . iso-latin-1)
@@ -75,6 +77,9 @@ Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans."))
         ?\\e,AU\e(B ?\\e,AV\e(B ?\\e,AW\e(B ?\\e,AX\e(B ?\\e,AY\e(B ?\\e,AZ\e(B ?\\e,A[\e(B ?\\e,A\\e(B ?\\e,A]\e(B ?\\e,A^\e(B ?\\e,A_\e(B ?\\e,A`\e(B ?\\e,Aa\e(B ?\\e,Ab\e(B ?\\e,Ac\e(B ?\\e,Ad\e(B ?\\e,Ae\e(B
         ?\\e,Af\e(B ?\\e,Ag\e(B ?\\e,Ah\e(B ?\\e,Ai\e(B ?\\e,Aj\e(B ?\\e,Ak\e(B ?\\e,Al\e(B ?\\e,Am\e(B ?\\e,An\e(B ?\\e,Ao\e(B ?\\e,Ap\e(B ?\\e,Aq\e(B ?\\e,Ar\e(B ?\\e,As\e(B ?\\e,At\e(B ?\\e,Au\e(B ?\\e,Av\e(B
         ?\\e,Aw\e(B ?\\e,Ax\e(B ?\\e,Ay\e(B ?\\e,Az\e(B ?\\e,A{\e(B ?\\e,A|\e(B ?\\e,A}\e(B ?\\e,A~\e(B ?\\e,A\7f\e(B])))
+
+(define-coding-system-alias 'cp1252 'windows-1252)
+
 \f
 ;; Latin-2 (ISO-8859-2)
 
@@ -273,7 +278,7 @@ but it selects the Dutch tutorial and input method."))
  "German" '((tutorial . "TUTORIAL.de")
            (charset ascii latin-iso8859-1)
            (coding-system iso-latin-1 iso-latin-9)
-           (coding-priority iso-latin-1)
+           (coding-priority iso-latin-1 windows-1252)
            (input-method . "german-postfix")
            (nonascii-translation . latin-iso8859-1)
            (unibyte-syntax . "latin-1")
@@ -363,7 +368,22 @@ and it selects the Spanish tutorial."))
             (unibyte-display . iso-latin-5)
             (input-method . "turkish-postfix")
             (sample-text . "Turkish (T\e,M|\e(Brk\e,Mg\e(Be)       Merhaba")
-            (documentation . t)))
+            (documentation . t)
+            (setup-function . turkish-case-conversion-enable)
+            (exit-function . turkish-case-conversion-disable)))
+
+(defun turkish-case-conversion-enable ()
+  "Set up Turkish case conversion of `i' and `I' into `\e$,1 P\e(B' and `\e$,1 Q\e(B'."
+  (let ((table (standard-case-table)))
+    (set-case-syntax-pair ?\e$,1 P\e(B ?i table)
+    (set-case-syntax-pair ?I ?\e$,1 Q\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 ?\e$,1 P\e(B "w" table)
+    (set-case-syntax ?\e$,1 Q\e(B "w" table)))
 
 ;; Polish ISO 8859-2 environment.
 ;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl>
@@ -451,6 +471,19 @@ and it selects the Spanish tutorial."))
              (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)
+           (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)
+           (input-method . "latin-1-prefix")
+           (sample-text . "Oi")
+           (documentation . "Support for Brazilian Portuguese."))
+ '("European"))
 \f
 ;; Definitions for the Mac Roman character sets and coding system.
 ;; The Mac Roman encoding uses all 128 code points in the range 128 to