]> code.delx.au - gnu-emacs/blobdiff - lisp/language/cyril-util.el
(indian-make-hash): Switch makehash -> make-hash-table.
[gnu-emacs] / lisp / language / cyril-util.el
index 8aa51a04c517ae1baec01cea69951eeeddfc9954..e35d45b5afe5f30beba618cf2ea7628ba8d85844 100644 (file)
@@ -1,6 +1,6 @@
-;;; cyril-util.el ---  utilities for Cyrillic scripts
+;;; cyril-util.el --- utilities for Cyrillic scripts
 
-;; Copyright (C) 1997  Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001 Free Software Foundation, Inc.
 
 ;; Keywords: mule, multilingual, Cyrillic
 
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
-;;; Code:
-
-;;;###autoload
-(defun setup-cyrillic-iso-environment ()
-  "Setup multilingual environment (MULE) for Cyrillic ISO-8859-5 users."
-  (interactive)
-  (setup-8-bit-environment "Cyrillic-ISO" 'cyrillic-iso8859-5
-                          "cyrillic-yawerty"))
+;;; Commentary:
 
-;;;###autoload
-(defun setup-cyrillic-koi8-environment ()
-  "Setup multilingual environment (MULE) for Cyrillic KOI8 users."
-  (interactive)
-  (setup-8-bit-environment "Cyrillic-KOI8" 'cyrillic-iso8859-5
-                          "cyrillic-yawerty"))
-
-;;;###autoload
-(defun setup-cyrillic-alternativnyj-environment ()
-  "Setup multilingual environment (MULE) for Cyrillic ALTERNATIVNYJ users."
-  (interactive)
-  (setup-8-bit-environment "Cyrillic-ALT" 'cyrillic-iso8859-5
-                          "cyrillic-yawerty")
-  (setq coding-category-raw-text 'cyrillic-alternativnyj))
+;;; Code:
 
 ;;;###autoload
 (defun cyrillic-encode-koi8-r-char (char)
   "Return KOI8-R external character code of CHAR if appropriate."
-  (aref (char-table-extra-slot cyrillic-koi8-r-nonascii-translation-table 0)
+  (aref (char-table-extra-slot
+        (get 'cyrillic-koi8-r-nonascii-translation-table 'translation-table)
+        0)
        char))
 
 ;;;###autoload
 (defun cyrillic-encode-alternativnyj-char (char)
   "Return ALTERNATIVNYJ external character code of CHAR if appropriate."
   (aref (char-table-extra-slot
-        cyrillic-alternativnyj-nonascii-translation-table 0)
+        (get 'cyrillic-alternativnyj-nonascii-translation-table
+             'translation-table)
+        0)
        char))
 
 \f
-;; Display 
+;; Display
 
 ;; Written by Valery Alexeev <valery@math.uga.edu>.
 
 (defvar cyrillic-language-alist
-      (list '("Belorussian") '("Bulgarian") '("Macedonian") 
+      (list '("Belorussian") '("Bulgarian") '("Macedonian")
            '("Russian") '("Serbo-Croatian") '("Ukrainian"))
-      "*List of known cyrillic languages")
+      "List of known cyrillic languages.")
 
 ;;;###autoload
 (defun standard-display-cyrillic-translit (&optional cyrillic-language)
@@ -76,7 +60,7 @@ different from the one used for the input method `cyrillic-translit'.
 
 The argument is a string which specifies which language you are using;
 that affects the choice of transliterations slightly.
-Possible values are listed in 'cyrillic-language-alist'.
+Possible values are listed in `cyrillic-language-alist'.
 If the argument is t, we use the default cyrillic transliteration.
 If the argument is nil, we return the display table to its standard state."
   (interactive
@@ -161,7 +145,7 @@ If the argument is nil, we return the display table to its standard state."
     (aset standard-display-table ?\e,LM\e(B  [?E?'])
     (aset standard-display-table ?\e,LN\e(B  [?Y?u])
     (aset standard-display-table ?\e,LO\e(B  [?Y?a])
-    
+
     (aset standard-display-table ?\e,Lt\e(B  [?i?e])
     (aset standard-display-table ?\e,Lw\e(B  [?i])
     (aset standard-display-table ?\e,L~\e(B  [?u])
@@ -175,7 +159,7 @@ If the argument is nil, we return the display table to its standard state."
     (aset standard-display-table ?\e,Ly\e(B  [?l?j])
     (aset standard-display-table ?\e,Lz\e(B  [?n?j])
     (aset standard-display-table ?\e,L\7f\e(B  [?d?z])
-    
+
     (aset standard-display-table ?\e,L$\e(B  [?Y?e])
     (aset standard-display-table ?\e,L'\e(B  [?Y?i])
     (aset standard-display-table ?\e,L.\e(B  [?U])
@@ -189,30 +173,140 @@ If the argument is nil, we return the display table to its standard state."
     (aset standard-display-table ?\e,L)\e(B  [?L?j])
     (aset standard-display-table ?\e,L*\e(B  [?N?j])
     (aset standard-display-table ?\e,L/\e(B  [?D?j])
-    
+
+    ;; Unicode version:
+    (aset standard-display-table ?\e$,1(P\e(B  [?a])
+    (aset standard-display-table ?\e$,1(Q\e(B  [?b])
+    (aset standard-display-table ?\e$,1(R\e(B  [?v])
+    (aset standard-display-table ?\e$,1(S\e(B  [?g])
+    (aset standard-display-table ?\e$,1(T\e(B  [?d])
+    (aset standard-display-table ?\e$,1(U\e(B  [?e])
+    (aset standard-display-table ?\e$,1(q\e(B  [?y?o])
+    (aset standard-display-table ?\e$,1(V\e(B  [?z?h])
+    (aset standard-display-table ?\e$,1(W\e(B  [?z])
+    (aset standard-display-table ?\e$,1(X\e(B  [?i])
+    (aset standard-display-table ?\e$,1(Y\e(B  [?j])
+    (aset standard-display-table ?\e$,1(Z\e(B  [?k])
+    (aset standard-display-table ?\e$,1([\e(B  [?l])
+    (aset standard-display-table ?\e$,1(\\e(B  [?m])
+    (aset standard-display-table ?\e$,1(]\e(B  [?n])
+    (aset standard-display-table ?\e$,1(^\e(B  [?o])
+    (aset standard-display-table ?\e$,1(_\e(B  [?p])
+    (aset standard-display-table ?\e$,1(`\e(B  [?r])
+    (aset standard-display-table ?\e$,1(a\e(B  [?s])
+    (aset standard-display-table ?\e$,1(b\e(B  [?t])
+    (aset standard-display-table ?\e$,1(c\e(B  [?u])
+    (aset standard-display-table ?\e$,1(d\e(B  [?f])
+    (aset standard-display-table ?\e$,1(e\e(B  [?k?h])
+    (aset standard-display-table ?\e$,1(f\e(B  [?t?s])
+    (aset standard-display-table ?\e$,1(g\e(B  [?c?h])
+    (aset standard-display-table ?\e$,1(h\e(B  [?s?h])
+    (aset standard-display-table ?\e$,1(i\e(B  [?s?c?h])
+    (aset standard-display-table ?\e$,1(j\e(B  [?~])
+    (aset standard-display-table ?\e$,1(k\e(B  [?y])
+    (aset standard-display-table ?\e$,1(l\e(B  [?'])
+    (aset standard-display-table ?\e$,1(m\e(B  [?e?'])
+    (aset standard-display-table ?\e$,1(n\e(B  [?y?u])
+    (aset standard-display-table ?\e$,1(o\e(B  [?y?a])
+
+    (aset standard-display-table ?\e$,1(0\e(B  [?A])
+    (aset standard-display-table ?\e$,1(1\e(B  [?B])
+    (aset standard-display-table ?\e$,1(2\e(B  [?V])
+    (aset standard-display-table ?\e$,1(3\e(B  [?G])
+    (aset standard-display-table ?\e$,1(4\e(B  [?D])
+    (aset standard-display-table ?\e$,1(5\e(B  [?E])
+    (aset standard-display-table ?\e$,1(!\e(B  [?Y?o])
+    (aset standard-display-table ?\e$,1(6\e(B  [?Z?h])
+    (aset standard-display-table ?\e$,1(7\e(B  [?Z])
+    (aset standard-display-table ?\e$,1(8\e(B  [?I])
+    (aset standard-display-table ?\e$,1(9\e(B  [?J])
+    (aset standard-display-table ?\e$,1(:\e(B  [?K])
+    (aset standard-display-table ?\e$,1(;\e(B  [?L])
+    (aset standard-display-table ?\e$,1(<\e(B  [?M])
+    (aset standard-display-table ?\e$,1(=\e(B  [?N])
+    (aset standard-display-table ?\e$,1(>\e(B  [?O])
+    (aset standard-display-table ?\e$,1(?\e(B  [?P])
+    (aset standard-display-table ?\e$,1(@\e(B  [?R])
+    (aset standard-display-table ?\e$,1(A\e(B  [?S])
+    (aset standard-display-table ?\e$,1(B\e(B  [?T])
+    (aset standard-display-table ?\e$,1(C\e(B  [?U])
+    (aset standard-display-table ?\e$,1(D\e(B  [?F])
+    (aset standard-display-table ?\e$,1(E\e(B  [?K?h])
+    (aset standard-display-table ?\e$,1(F\e(B  [?T?s])
+    (aset standard-display-table ?\e$,1(G\e(B  [?C?h])
+    (aset standard-display-table ?\e$,1(H\e(B  [?S?h])
+    (aset standard-display-table ?\e$,1(I\e(B  [?S?c?h])
+    (aset standard-display-table ?\e$,1(J\e(B  [?~])
+    (aset standard-display-table ?\e$,1(K\e(B  [?Y])
+    (aset standard-display-table ?\e$,1(L\e(B  [?'])
+    (aset standard-display-table ?\e$,1(M\e(B  [?E?'])
+    (aset standard-display-table ?\e$,1(N\e(B  [?Y?u])
+    (aset standard-display-table ?\e$,1(O\e(B  [?Y?a])
+
+    (aset standard-display-table ?\e$,1(t\e(B  [?i?e])
+    (aset standard-display-table ?\e$,1(w\e(B  [?i])
+    (aset standard-display-table ?\e$,1(~\e(B  [?u])
+    (aset standard-display-table ?\e$,1(r\e(B  [?d?j])
+    (aset standard-display-table ?\e$,1({\e(B  [?c?h?j])
+    (aset standard-display-table ?\e$,1(s\e(B  [?g?j])
+    (aset standard-display-table ?\e$,1(u\e(B  [?s])
+    (aset standard-display-table ?\e$,1(|\e(B  [?k])
+    (aset standard-display-table ?\e$,1(v\e(B  [?i])
+    (aset standard-display-table ?\e$,1(x\e(B  [?j])
+    (aset standard-display-table ?\e$,1(y\e(B  [?l?j])
+    (aset standard-display-table ?\e$,1(z\e(B  [?n?j])
+    (aset standard-display-table ?\e$,1(\7f\e(B  [?d?z])
+
+    (aset standard-display-table ?\e$,1($\e(B  [?Y?e])
+    (aset standard-display-table ?\e$,1('\e(B  [?Y?i])
+    (aset standard-display-table ?\e$,1(.\e(B  [?U])
+    (aset standard-display-table ?\e$,1("\e(B  [?D?j])
+    (aset standard-display-table ?\e$,1(+\e(B  [?C?h?j])
+    (aset standard-display-table ?\e$,1(#\e(B  [?G?j])
+    (aset standard-display-table ?\e$,1(%\e(B  [?S])
+    (aset standard-display-table ?\e$,1(,\e(B  [?K])
+    (aset standard-display-table ?\e$,1(&\e(B  [?I])
+    (aset standard-display-table ?\e$,1((\e(B  [?J])
+    (aset standard-display-table ?\e$,1()\e(B  [?L?j])
+    (aset standard-display-table ?\e$,1(*\e(B  [?N?j])
+    (aset standard-display-table ?\e$,1(/\e(B  [?D?j])
+
     (when (equal cyrillic-language "Bulgarian")
       (aset standard-display-table ?\e,Li\e(B [?s?h?t])
       (aset standard-display-table ?\e,LI\e(B [?S?h?t])
       (aset standard-display-table ?\e,Ln\e(B [?i?u])
       (aset standard-display-table ?\e,LN\e(B [?I?u])
       (aset standard-display-table ?\e,Lo\e(B [?i?a])
-      (aset standard-display-table ?\e,LO\e(B [?I?a]))
-    
-    (when (equal cyrillic-language "Ukrainian") ; based on the official 
+      (aset standard-display-table ?\e,LO\e(B [?I?a])
+      ;; Unicode version:
+      (aset standard-display-table ?\e$,1(i\e(B [?s?h?t])
+      (aset standard-display-table ?\e$,1(I\e(B [?S?h?t])
+      (aset standard-display-table ?\e$,1(n\e(B [?i?u])
+      (aset standard-display-table ?\e$,1(N\e(B [?I?u])
+      (aset standard-display-table ?\e$,1(o\e(B [?i?a])
+      (aset standard-display-table ?\e$,1(O\e(B [?I?a]))
+
+    (when (equal cyrillic-language "Ukrainian")        ; based on the official
                                        ; transliteration table
       (aset standard-display-table ?\e,LX\e(B [?y])
       (aset standard-display-table ?\e,L8\e(B [?Y])
       (aset standard-display-table ?\e,LY\e(B [?i])
       (aset standard-display-table ?\e,L9\e(B [?Y])
-    (aset standard-display-table ?\e,Ln\e(B [?i?u])
-    (aset standard-display-table ?\e,Lo\e(B [?i?a]))))
-
+      (aset standard-display-table ?\e,Ln\e(B [?i?u])
+      (aset standard-display-table ?\e,Lo\e(B [?i?a])
+      ;; Unicode version:
+      (aset standard-display-table ?\e$,1(X\e(B [?y])
+      (aset standard-display-table ?\e$,1(8\e(B [?Y])
+      (aset standard-display-table ?\e$,1(Y\e(B [?i])
+      (aset standard-display-table ?\e$,1(9\e(B [?Y])
+      (aset standard-display-table ?\e$,1(n\e(B [?i?u])
+      (aset standard-display-table ?\e$,1(o\e(B [?i?a]))))
 
 ;;
 (provide 'cyril-util)
 
-;;; cyril-util.el ends here
-
 ;; Local Variables:
-;; buffer-file-coding-system: iso-2022-7bit
+;; coding: iso-2022-7bit
 ;; End:
+
+;;; cyril-util.el ends here