Mercurial > emacs
annotate lisp/language/cyrillic.el @ 20086:92b4edaf6482
(winner-pending-undo-ring): Defvar before first use.
(winner-undo-counter): Likewise.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 16 Oct 1997 23:25:57 +0000 |
parents | 933bea774c3c |
children | dce0d588d203 |
rev | line source |
---|---|
17052 | 1 ;;; cyrillic.el --- Support for languages which use Cyrillic characters |
2 | |
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | |
18454
b44129078db3
Update copyright notice.
Richard M. Stallman <rms@gnu.org>
parents:
18308
diff
changeset
|
4 ;; Licensed to the Free Software Foundation. |
17052 | 5 |
6 ;; Keywords: multilingual, Cyrillic | |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
17071 | 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
17052 | 24 |
25 ;;; Commentary: | |
26 | |
17085
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
27 ;; The character set ISO8859-5 is supported. KOI-8 and ALTERNATIVNYJ |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
28 ;; are converted to ISO8859-5 internally. |
17052 | 29 |
30 ;;; Code: | |
31 | |
19451
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
32 ;; Cyrillic (general) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
33 |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
34 (define-prefix-command 'describe-cyrillic-environment-map) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
35 (define-key-after describe-language-environment-map [Cyrillic] |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
36 '("Cyrillic" . describe-cyrillic-environment-map) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
37 t) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
38 |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
39 (define-prefix-command 'setup-cyrillic-environment-map) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
40 (define-key-after setup-language-environment-map [Cyrillic] |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
41 '("Cyrillic" . setup-cyrillic-environment-map) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
42 t) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
43 |
17085
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
44 ;; ISO-8859-5 staff |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
45 |
17052 | 46 (make-coding-system |
18308 | 47 'cyrillic-iso-8bit 2 ?5 |
48 "ISO 2022 based 8-bit encoding for Cyrillic script (MIME:ISO-8859-5)" | |
17052 | 49 '((ascii t) (cyrillic-iso8859-5 t) nil nil |
50 nil ascii-eol ascii-cntl nil nil nil nil)) | |
51 | |
18520
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18454
diff
changeset
|
52 (define-coding-system-alias 'iso-8859-5 'cyrillic-iso-8bit) |
18308 | 53 |
19451
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
54 (set-language-info-alist |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
55 "Cyrillic-ISO" '((setup-function . (setup-cyrillic-iso-environment |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
56 . setup-cyrillic-environment-map)) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
57 (charset . (cyrillic-iso8859-5)) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
58 (coding-system . (cyrillic-iso-8bit)) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
59 (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
60 (documentation . ("Support for Cyrillic ISO-8859-5." |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
61 . describe-cyrillic-environment-map)))) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
62 |
17085
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
63 ;; KOI-8 staff |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
64 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
65 (define-ccl-program ccl-decode-koi8 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
66 '(3 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
67 ((read r0) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
68 (loop |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
69 (write-read-repeat |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
70 r0 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
71 [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
72 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
73 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
74 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
75 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
76 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
77 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
78 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
79 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
80 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
81 32 32 32 ?,Lq(B 32 32 32 32 32 32 32 32 32 32 32 32 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
82 32 32 32 ?,L!(B 32 32 32 32 32 32 32 32 32 32 32 32 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
83 ?,Ln(B ?,LP(B ?,LQ(B ?,Lf(B ?,LT(B ?,LU(B ?,Ld(B ?,LS(B ?,Le(B ?,LX(B ?,LY(B ?,LZ(B ?,L[(B ?,L\(B ?,L](B ?,L^(B |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
84 ?,L_(B ?,Lo(B ?,L`(B ?,La(B ?,Lb(B ?,Lc(B ?,LV(B ?,LR(B ?,Ll(B ?,Lk(B ?,LW(B ?,Lh(B ?,Lm(B ?,Li(B ?,Lg(B ?,Lj(B |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
85 ?,LN(B ?,L0(B ?,L1(B ?,LF(B ?,L4(B ?,L5(B ?,LD(B ?,L3(B ?,LE(B ?,L8(B ?,L9(B ?,L:(B ?,L;(B ?,L<(B ?,L=(B ?,L>(B |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
86 ?,L?(B ?,LO(B ?,L@(B ?,LA(B ?,LB(B ?,LC(B ?,L6(B ?,L2(B ?,LL(B ?,LK(B ?,L7(B ?,LH(B ?,LM(B ?,LI(B ?,LG(B ?,LJ(B ])))) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
87 "CCL program to decode KOI8.") |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
88 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
89 (define-ccl-program ccl-encode-koi8 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
90 `(1 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
91 ((read r0) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
92 (loop |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
93 (if (r0 != ,(charset-id 'cyrillic-iso8859-5)) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
94 (write-read-repeat r0) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
95 ((read r0) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
96 (r0 -= 160) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
97 (write-read-repeat |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
98 r0 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
99 [ 32 179 32 32 32 32 32 32 32 32 32 32 32 32 32 32 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
100 225 226 247 231 228 229 246 250 233 234 235 236 237 238 239 240 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
101 242 243 244 245 230 232 227 254 251 253 255 249 248 252 224 241 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
102 193 194 215 199 196 197 214 218 201 202 203 204 205 206 207 208 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
103 210 211 212 213 198 200 195 222 219 221 223 217 216 220 192 209 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
104 32 163 32 32 32 32 32 32 32 32 32 32 32 32 32 32]) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
105 ))))) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
106 "CCL program to encode KOI8.") |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
107 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
108 (make-coding-system |
18203
0745f30aec66
Adjusted for coding system name change.
Kenichi Handa <handa@m17n.org>
parents:
18155
diff
changeset
|
109 'cyrillic-koi8 4 |
18116
7839aa2f6765
(koi8-r): Use R for mode line.
Richard M. Stallman <rms@gnu.org>
parents:
17993
diff
changeset
|
110 ;; We used to use ?K. It is true that ?K is more strictly correct, |
7839aa2f6765
(koi8-r): Use R for mode line.
Richard M. Stallman <rms@gnu.org>
parents:
17993
diff
changeset
|
111 ;; but it is also used for Korean. |
7839aa2f6765
(koi8-r): Use R for mode line.
Richard M. Stallman <rms@gnu.org>
parents:
17993
diff
changeset
|
112 ;; So people who use koi8 for languages other than Russian |
7839aa2f6765
(koi8-r): Use R for mode line.
Richard M. Stallman <rms@gnu.org>
parents:
17993
diff
changeset
|
113 ;; will have to forgive us. |
18308 | 114 ?R "KOI8 8-bit encoding for Cyrillic (MIME: KOI8-R)" |
17085
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
115 (cons ccl-decode-koi8 ccl-encode-koi8)) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
116 |
18520
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18454
diff
changeset
|
117 (define-coding-system-alias 'koi8-r 'cyrillic-koi8) |
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18454
diff
changeset
|
118 (define-coding-system-alias 'koi8 'cyrillic-koi8) |
17085
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
119 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
120 (define-ccl-program ccl-encode-koi8-font |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
121 '(0 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
122 ((r1 -= 160) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
123 (r1 = r1 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
124 [ 32 179 32 32 32 32 32 32 32 32 32 32 32 32 32 32 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
125 225 226 247 231 228 229 246 250 233 234 235 236 237 238 239 240 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
126 242 243 244 245 230 232 227 254 251 253 255 249 248 252 224 241 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
127 193 194 215 199 196 197 214 218 201 202 203 204 205 206 207 208 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
128 210 211 212 213 198 200 195 222 219 221 223 217 216 220 192 209 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
129 32 163 32 32 32 32 32 32 32 32 32 32 32 32 32 32]) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
130 )) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
131 "CCL program to encode Cyrillic chars to KOI font.") |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
132 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
133 (setq font-ccl-encoder-alist |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
134 (cons (cons "koi8" ccl-encode-koi8-font) font-ccl-encoder-alist)) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
135 |
19451
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
136 (set-language-info-alist |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
137 "Cyrillic-KOI8" '((setup-function . (setup-cyrillic-koi8-environment |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
138 . setup-cyrillic-environment-map)) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
139 (charset . (cyrillic-iso8859-5)) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
140 (coding-system . (cyrillic-koi8)) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
141 (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
142 (documentation . ("Support for Cyrillic KOI-8." |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
143 . describe-cyrillic-environment-map)))) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
144 |
17085
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
145 ;;; ALTERNATIVNYJ staff |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
146 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
147 (define-ccl-program ccl-decode-alternativnyj |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
148 '(3 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
149 ((read r0) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
150 (loop |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
151 (write-read-repeat |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
152 r0 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
153 [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
154 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
155 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
156 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
157 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
158 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
159 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
160 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
161 ?,L0(B ?,L1(B ?,L2(B ?,L3(B ?,L4(B ?,L5(B ?,L6(B ?,L7(B ?,L8(B ?,L9(B ?,L:(B ?,L;(B ?,L<(B ?,L=(B ?,L>(B ?,L?(B |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
162 ?,L@(B ?,LA(B ?,LB(B ?,LC(B ?,LD(B ?,LE(B ?,LF(B ?,LG(B ?,LH(B ?,LI(B ?,LJ(B ?,LK(B ?,LL(B ?,LM(B ?,LN(B ?,LO(B |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
163 ?,LP(B ?,LQ(B ?,LR(B ?,LS(B ?,LT(B ?,LU(B ?,LV(B ?,LW(B ?,LX(B ?,LY(B ?,LZ(B ?,L[(B ?,L\(B ?,L](B ?,L^(B ?,L_(B |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
164 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
165 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
166 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
167 ?,L`(B ?,La(B ?,Lb(B ?,Lc(B ?,Ld(B ?,Le(B ?,Lf(B ?,Lg(B ?,Lh(B ?,Li(B ?,Lj(B ?,Lk(B ?,Ll(B ?,Lm(B ?,Ln(B ?,Lo(B |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
168 ?,L!(B ?,Lq(B 32 32 32 32 32 32 32 32 32 32 32 32 32 ?,Lp(B])))) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
169 "CCL program to decode Alternativnyj.") |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
170 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
171 (define-ccl-program ccl-encode-alternativnyj |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
172 `(1 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
173 ((read r0) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
174 (loop |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
175 (if (r0 != ,(charset-id 'cyrillic-iso8859-5)) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
176 (write-read-repeat r0) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
177 ((read r0) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
178 (r0 -= 160) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
179 (write-read-repeat |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
180 r0 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
181 [ 32 240 32 32 32 32 32 32 32 32 32 32 32 32 32 32 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
182 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
183 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
184 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
185 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
186 255 241 32 32 32 32 32 32 32 32 32 32 32 32 32 32]) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
187 ))))) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
188 "CCL program to encode Alternativnyj.") |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
189 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
190 (make-coding-system |
18308 | 191 'cyrillic-alternativnyj 4 ?A |
192 "ALTERNATIVNYJ 8-bit encoding for Cyrillic" | |
17085
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
193 (cons ccl-decode-alternativnyj ccl-encode-alternativnyj)) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
194 |
18520
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18454
diff
changeset
|
195 (define-coding-system-alias 'alternativnyj 'cyrillic-alternativnyj) |
18308 | 196 |
17085
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
197 (define-ccl-program ccl-encode-alternativnyj-font |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
198 '(0 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
199 ((r1 -= 160) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
200 (r1 = r1 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
201 [ 32 240 32 32 32 32 32 32 32 32 32 32 32 32 32 32 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
202 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
203 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
204 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
205 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
206 255 241 32 32 32 32 32 32 32 32 32 32 32 32 32 32]) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
207 )) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
208 "CCL program to encode Cyrillic chars to Alternativnyj font.") |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
209 |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
210 (setq font-ccl-encoder-alist |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
211 (cons (cons "alternativnyj" ccl-encode-alternativnyj-font) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
212 font-ccl-encoder-alist)) |
4dafa5431293
Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
213 |
17993
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17841
diff
changeset
|
214 (set-language-info-alist |
19451
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
215 "Cyrillic-ALT" '((setup-function . (setup-cyrillic-alternativnyj-environment |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
216 . setup-cyrillic-environment-map)) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
217 (charset . (cyrillic-iso8859-5)) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
218 (coding-system . (cyrillic-alternativnyj)) |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
219 (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
220 (documentation . ("Support for Cyrillic ALTERNATIVNYJ." |
933bea774c3c
Make describe-cyrillic-environment-map and
Kenichi Handa <handa@m17n.org>
parents:
18520
diff
changeset
|
221 . describe-cyrillic-environment-map)))) |
17052 | 222 |
223 ;;; cyrillic.el ends here |