]> code.delx.au - gnu-emacs/blobdiff - lisp/language/european.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / language / european.el
index b497abfd5993f5e9adc231e2bb26d8fb64c17be7..b7532eb1a47420b597e31d6c80a590d4aac5dc65 100644 (file)
@@ -1,8 +1,9 @@
 ;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*-
 
-;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
 ;;   Free Software Foundation, Inc.
-;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 ;; Copyright (C) 2003
@@ -25,8 +26,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:
 
@@ -486,19 +487,25 @@ and it selects the Spanish tutorial."))
             (unibyte-display . iso-latin-5)
             (input-method . "turkish-postfix")
             (sample-text . "Turkish (T\e$(D+d\e(Brk\e$(D+.\e(Be)   Merhaba")
-            (setup-function
-             . (lambda ()
-                 (set-case-syntax-pair ?I ?\e$(D)E\e(B (standard-case-table))
-                 (set-case-syntax-pair ?\e$(D*D\e(B ?i (standard-case-table))))
-            (exit-function
-             . (lambda ()
-                 (set-case-syntax-pair ?I ?i (standard-case-table))
-                 (set-case-syntax ?\e$(D)E\e(B "w" (standard-case-table))
-                 (set-case-syntax ?\e$(D*D\e(B "w" (standard-case-table))))
+            (setup-function . turkish-case-conversion-enable)
+            (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, \e$(D)E\e(B, \e$(D*D\e(B.")))
 
+(defun turkish-case-conversion-enable ()
+  "Set up Turkish case conversion of `i' and `I' into `\e$(D*D\e(B' and `\e$(D)E\e(B'."
+  (let ((table (standard-case-table)))
+    (set-case-syntax-pair ?\e$(D*D\e(B ?i table)
+    (set-case-syntax-pair ?I ?\e$(D)E\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$(D*D\e(B "w" table)
+    (set-case-syntax ?\e$(D)E\e(B "w" table)))
+
 ;; Polish ISO 8859-2 environment.
 ;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl>
 ;; Keywords: multilingual, Polish