(cyrillic-language-alist): Fix punctuation.
[bpt/emacs.git] / lisp / language / cyril-util.el
CommitLineData
d6c7b552
KH
1;;; cyril-util.el --- utilities for Cyrillic scripts
2
3cea0ca7 3;; Copyright (C) 1997 Free Software Foundation, Inc.
d6c7b552
KH
4
5;; Keywords: mule, multilingual, Cyrillic
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software; you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation; either version 2, or (at your option)
12;; any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs; see the file COPYING. If not, write to the
21;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22;; Boston, MA 02111-1307, USA.
23
24;;; Code:
25
26;;;###autoload
9e9af2e9
KH
27(defun setup-cyrillic-environment ()
28 "Setup multilingual environment (MULE) for Cyrillic users."
d6c7b552 29 (interactive)
8aa28cb6 30 (setup-8-bit-environment "Cyrillic" 'cyrillic-iso8859-5 'cyrillic-iso-8bit
049f7425 31 "cyrillic-yawerty")
d6c7b552 32 (setq primary-language "Cyrillic"))
71ed4992
RS
33\f
34;; Display
35
36;; Written by Valery Alexeev <valery@math.uga.edu>.
37
7286c88e 38(defvar cyrillic-language-alist
729b30ae 39 (list '("Belorussian") '("Bulgarian") '("Macedonian")
f58bb396 40 '("Russian") '("Serbo-Croatian") '("Ukrainian"))
7286c88e
KH
41 "*List of known cyrillic languages")
42
7286c88e
KH
43;;;###autoload
44(defun standard-display-cyrillic-translit (&optional cyrillic-language)
71ed4992
RS
45 "Display a cyrillic buffer using a transliteration.
46For readability, the table is slightly
47different from the one used for the input method `cyrillic-translit'.
48
7286c88e 49The argument is a string which specifies which language you are using;
71ed4992 50that affects the choice of transliterations slightly.
7286c88e
KH
51Possible values are listed in 'cyrillic-language-alist'.
52If the argument is t, we use the default cyrillic transliteration.
71ed4992 53If the argument is nil, we return the display table to its standard state."
2631431f
RS
54 (interactive
55 (list
56 (let* ((completion-ignore-case t))
57 (completing-read
58 "Cyrillic language (default nil): "
59 cyrillic-language-alist nil t nil nil nil))))
60
61 (or standard-display-table
62 (setq standard-display-table (make-display-table)))
7286c88e
KH
63
64 (if (equal cyrillic-language "")
65 (setq cyrillic-language nil))
66
71ed4992
RS
67 (if (null cyrillic-language)
68 (setq standard-display-table (make-display-table))
7286c88e
KH
69 (aset standard-display-table ?\e,LP\e(B [?a])
70 (aset standard-display-table ?\e,LQ\e(B [?b])
71 (aset standard-display-table ?\e,LR\e(B [?v])
72 (aset standard-display-table ?\e,LS\e(B [?g])
73 (aset standard-display-table ?\e,LT\e(B [?d])
74 (aset standard-display-table ?\e,LU\e(B [?e])
75 (aset standard-display-table ?\e,Lq\e(B [?y?o])
76 (aset standard-display-table ?\e,LV\e(B [?z?h])
77 (aset standard-display-table ?\e,LW\e(B [?z])
78 (aset standard-display-table ?\e,LX\e(B [?i])
79 (aset standard-display-table ?\e,LY\e(B [?j])
80 (aset standard-display-table ?\e,LZ\e(B [?k])
81 (aset standard-display-table ?\e,L[\e(B [?l])
82 (aset standard-display-table ?\e,L\\e(B [?m])
83 (aset standard-display-table ?\e,L]\e(B [?n])
84 (aset standard-display-table ?\e,L^\e(B [?o])
85 (aset standard-display-table ?\e,L_\e(B [?p])
86 (aset standard-display-table ?\e,L`\e(B [?r])
87 (aset standard-display-table ?\e,La\e(B [?s])
88 (aset standard-display-table ?\e,Lb\e(B [?t])
89 (aset standard-display-table ?\e,Lc\e(B [?u])
90 (aset standard-display-table ?\e,Ld\e(B [?f])
91 (aset standard-display-table ?\e,Le\e(B [?k?h])
92 (aset standard-display-table ?\e,Lf\e(B [?t?s])
93 (aset standard-display-table ?\e,Lg\e(B [?c?h])
94 (aset standard-display-table ?\e,Lh\e(B [?s?h])
95 (aset standard-display-table ?\e,Li\e(B [?s?c?h])
96 (aset standard-display-table ?\e,Lj\e(B [?~])
97 (aset standard-display-table ?\e,Lk\e(B [?y])
98 (aset standard-display-table ?\e,Ll\e(B [?'])
99 (aset standard-display-table ?\e,Lm\e(B [?e?'])
100 (aset standard-display-table ?\e,Ln\e(B [?y?u])
101 (aset standard-display-table ?\e,Lo\e(B [?y?a])
102
103 (aset standard-display-table ?\e,L0\e(B [?A])
104 (aset standard-display-table ?\e,L1\e(B [?B])
105 (aset standard-display-table ?\e,L2\e(B [?V])
106 (aset standard-display-table ?\e,L3\e(B [?G])
107 (aset standard-display-table ?\e,L4\e(B [?D])
108 (aset standard-display-table ?\e,L5\e(B [?E])
109 (aset standard-display-table ?\e,L!\e(B [?Y?o])
110 (aset standard-display-table ?\e,L6\e(B [?Z?h])
111 (aset standard-display-table ?\e,L7\e(B [?Z])
112 (aset standard-display-table ?\e,L8\e(B [?I])
113 (aset standard-display-table ?\e,L9\e(B [?J])
114 (aset standard-display-table ?\e,L:\e(B [?K])
115 (aset standard-display-table ?\e,L;\e(B [?L])
116 (aset standard-display-table ?\e,L<\e(B [?M])
117 (aset standard-display-table ?\e,L=\e(B [?N])
118 (aset standard-display-table ?\e,L>\e(B [?O])
119 (aset standard-display-table ?\e,L?\e(B [?P])
120 (aset standard-display-table ?\e,L@\e(B [?R])
121 (aset standard-display-table ?\e,LA\e(B [?S])
122 (aset standard-display-table ?\e,LB\e(B [?T])
123 (aset standard-display-table ?\e,LC\e(B [?U])
124 (aset standard-display-table ?\e,LD\e(B [?F])
125 (aset standard-display-table ?\e,LE\e(B [?K?h])
126 (aset standard-display-table ?\e,LF\e(B [?T?s])
127 (aset standard-display-table ?\e,LG\e(B [?C?h])
128 (aset standard-display-table ?\e,LH\e(B [?S?h])
129 (aset standard-display-table ?\e,LI\e(B [?S?c?h])
130 (aset standard-display-table ?\e,LJ\e(B [?~])
131 (aset standard-display-table ?\e,LK\e(B [?Y])
132 (aset standard-display-table ?\e,LL\e(B [?'])
133 (aset standard-display-table ?\e,LM\e(B [?E?'])
134 (aset standard-display-table ?\e,LN\e(B [?Y?u])
135 (aset standard-display-table ?\e,LO\e(B [?Y?a])
136
137 (aset standard-display-table ?\e,Lt\e(B [?i?e])
138 (aset standard-display-table ?\e,Lw\e(B [?i])
139 (aset standard-display-table ?\e,L~\e(B [?u])
140 (aset standard-display-table ?\e,Lr\e(B [?d?j])
141 (aset standard-display-table ?\e,L{\e(B [?c?h?j])
142 (aset standard-display-table ?\e,Ls\e(B [?g?j])
143 (aset standard-display-table ?\e,Lu\e(B [?s])
144 (aset standard-display-table ?\e,L|\e(B [?k])
145 (aset standard-display-table ?\e,Lv\e(B [?i])
146 (aset standard-display-table ?\e,Lx\e(B [?j])
147 (aset standard-display-table ?\e,Ly\e(B [?l?j])
148 (aset standard-display-table ?\e,Lz\e(B [?n?j])
149 (aset standard-display-table ?\e,L\7f\e(B [?d?z])
150
151 (aset standard-display-table ?\e,L$\e(B [?Y?e])
152 (aset standard-display-table ?\e,L'\e(B [?Y?i])
153 (aset standard-display-table ?\e,L.\e(B [?U])
154 (aset standard-display-table ?\e,L"\e(B [?D?j])
155 (aset standard-display-table ?\e,L+\e(B [?C?h?j])
156 (aset standard-display-table ?\e,L#\e(B [?G?j])
157 (aset standard-display-table ?\e,L%\e(B [?S])
158 (aset standard-display-table ?\e,L,\e(B [?K])
159 (aset standard-display-table ?\e,L&\e(B [?I])
160 (aset standard-display-table ?\e,L(\e(B [?J])
161 (aset standard-display-table ?\e,L)\e(B [?L?j])
162 (aset standard-display-table ?\e,L*\e(B [?N?j])
163 (aset standard-display-table ?\e,L/\e(B [?D?j])
164
165 (when (equal cyrillic-language "Bulgarian")
166 (aset standard-display-table ?\e,Li\e(B [?s?h?t])
167 (aset standard-display-table ?\e,LI\e(B [?S?h?t])
168 (aset standard-display-table ?\e,Ln\e(B [?i?u])
169 (aset standard-display-table ?\e,LN\e(B [?I?u])
170 (aset standard-display-table ?\e,Lo\e(B [?i?a])
171 (aset standard-display-table ?\e,LO\e(B [?I?a]))
172
173 (when (equal cyrillic-language "Ukrainian") ; based on the official
71ed4992 174 ; transliteration table
7286c88e
KH
175 (aset standard-display-table ?\e,LX\e(B [?y])
176 (aset standard-display-table ?\e,L8\e(B [?Y])
177 (aset standard-display-table ?\e,LY\e(B [?i])
178 (aset standard-display-table ?\e,L9\e(B [?Y])
179 (aset standard-display-table ?\e,Ln\e(B [?i?u])
180 (aset standard-display-table ?\e,Lo\e(B [?i?a]))))
181
d6c7b552 182
d6c7b552 183;;
9e9af2e9 184(provide 'cyril-util)
d6c7b552 185
d6c7b552 186;;; cyril-util.el ends here
7286c88e
KH
187
188;; Local Variables:
189;; buffer-file-coding-system: iso-2022-7bit
190;; End: