(ascii-case-table): New var.
authorChong Yidong <cyd@stupidchicken.com>
Wed, 4 Apr 2007 15:34:59 +0000 (15:34 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Wed, 4 Apr 2007 15:34:59 +0000 (15:34 +0000)
lisp/international/mule.el

index 52bf622..bcf6827 100644 (file)
@@ -392,6 +392,20 @@ code-point in CCS.  Currently not supported and just ignored."
                        char))))))))
 
 \f
+;; Save the ASCII case table in case we need it later.  Some locales
+;; (such as Turkish) modify the case behavior of ASCII characters,
+;; which can interfere with networking code that uses ASCII strings.
+
+(defvar ascii-case-table
+  ;; Code copied from copy-case-table to avoid requiring case-table.el
+  (let ((tbl (copy-sequence (standard-case-table)))
+       (up  (char-table-extra-slot (standard-case-table) 0)))
+    (if up (set-char-table-extra-slot tbl 0 (copy-sequence up)))
+    (set-char-table-extra-slot tbl 1 nil)
+    (set-char-table-extra-slot tbl 2 nil)
+    tbl)
+  "Case table for the ASCII character set.")
+\f
 ;; Coding system stuff
 
 ;; Coding system is a symbol that has the property `coding-system'.