annotate lisp/language/cyrillic.el @ 17447:dc2cb454b330

(Fprimitive_undo): When inserting, always insert after markers (the ordinary kind of insertion).
author Richard M. Stallman <rms@gnu.org>
date Mon, 14 Apr 1997 08:51:18 +0000
parents 4dafa5431293
children 550afdbb31d8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1 ;;; cyrillic.el --- Support for languages which use Cyrillic characters
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
2
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
5
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
6 ;; Keywords: multilingual, Cyrillic
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
7
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
9
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
13 ;; any later version.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
14
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
18 ;; GNU General Public License for more details.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
19
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
17071
70194012fb3a Fix FSF address in comment.
Karl Heuer <kwzh@gnu.org>
parents: 17052
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
70194012fb3a Fix FSF address in comment.
Karl Heuer <kwzh@gnu.org>
parents: 17052
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
70194012fb3a Fix FSF address in comment.
Karl Heuer <kwzh@gnu.org>
parents: 17052
diff changeset
23 ;; Boston, MA 02111-1307, USA.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
24
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
25 ;;; Commentary:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
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
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
29
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
30 ;;; Code:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
31
17085
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
32 ;; ISO-8859-5 staff
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
33
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
34 (make-coding-system
17085
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
35 'iso-8859-5 2 ?5 "MIME ISO-8859-5"
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
36 '((ascii t) (cyrillic-iso8859-5 t) nil nil
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
37 nil ascii-eol ascii-cntl nil nil nil nil))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
38
17085
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
39 ;; KOI-8 staff
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
40
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
41 (define-ccl-program ccl-decode-koi8
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
42 '(3
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
43 ((read r0)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
44 (loop
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
45 (write-read-repeat
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
46 r0
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
47 [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
48 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
49 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
50 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
51 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
52 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
53 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
54 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
55 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
56 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
57 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
58 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
59 ?,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
60 ?,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
61 ?,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
62 ?,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
63 "CCL program to decode KOI8.")
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-encode-koi8
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
66 `(1
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 (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
70 (write-read-repeat r0)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
71 ((read r0)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
72 (r0 -= 160)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
73 (write-read-repeat
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
74 r0
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
75 [ 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
76 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
77 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
78 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
79 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
80 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
81 )))))
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
82 "CCL program to encode KOI8.")
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
83
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
84 (make-coding-system
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
85 'koi8-r 4
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
86 ?K "Coding-system used for KOI8."
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
87 (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
88
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
89 (define-coding-system-alias 'koi8-r 'koi8)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
90
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
91 (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
92 '(0
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
93 ((r1 -= 160)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
94 (r1 = r1
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
95 [ 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
96 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
97 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
98 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
99 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
100 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
101 ))
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
102 "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
103
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
104 (setq font-ccl-encoder-alist
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
105 (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
106
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
107 ;;; ALTERNATIVNYJ staff
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
108
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
109 (define-ccl-program ccl-decode-alternativnyj
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
110 '(3
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
111 ((read r0)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
112 (loop
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
113 (write-read-repeat
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
114 r0
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
115 [ 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
116 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
117 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
118 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
119 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
120 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
121 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
122 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
123 ?,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
124 ?,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
125 ?,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
126 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
127 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
128 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
129 ?,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
130 ?,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
131 "CCL program to decode Alternativnyj.")
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 (define-ccl-program ccl-encode-alternativnyj
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
134 `(1
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
135 ((read r0)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
136 (loop
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
137 (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
138 (write-read-repeat r0)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
139 ((read r0)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
140 (r0 -= 160)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
141 (write-read-repeat
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
142 r0
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
143 [ 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
144 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
145 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
146 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
147 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
148 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
149 )))))
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
150 "CCL program to encode Alternativnyj.")
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
151
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
152 (make-coding-system
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
153 'alternativnyj 4
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
154 ?A "Coding-system used for Alternativnyj"
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
155 (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
156
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
157 (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
158 '(0
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
159 ((r1 -= 160)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
160 (r1 = r1
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
161 [ 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
162 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
163 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
164 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
165 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
166 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
167 ))
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
168 "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
169
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
170 (setq font-ccl-encoder-alist
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
171 (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
172 font-ccl-encoder-alist))
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
173
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
174 ;;; GENERAL
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
175
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
176 (register-input-method
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
177 "Cyrillic" '("quail-jcuken" quail-use-package "quail/cyrillic"))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
178 (register-input-method
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
179 "Cyrillic" '("quail-macedonian" quail-use-package "quail/cyrillic"))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
180 (register-input-method
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
181 "Cyrillic" '("quail-serbian" quail-use-package "quail/cyrillic"))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
182 (register-input-method
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
183 "Cyrillic" '("quail-beylorussian" quail-use-package "quail/cyrillic"))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
184 (register-input-method
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
185 "Cyrillic" '("quail-ukrainian" quail-use-package "quail/cyrillic"))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
186 (register-input-method
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
187 "Cyrillic" '("quail-yawerty" quail-use-package "quail/cyrillic"))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
188
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
189 (defun setup-cyrillic-environment ()
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
190 (setq primary-language "Cyrillic")
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
191
17085
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
192 (setq coding-category-iso-8-1 'iso-8859-5)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
193
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
194 (set-coding-priority
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
195 '(coding-category-iso-7
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
196 coding-category-iso-8-1))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
197
17085
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
198 (setq-default buffer-file-coding-system 'iso-8859-5)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
199 (set-terminal-coding-system 'iso-8859-5)
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
200 (set-keyboard-coding-system 'iso-8859-5)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
201
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
202 (setq default-input-method '("Cyrillic" . "quail-yawerty"))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
203 )
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
204
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
205 (set-language-info-alist
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
206 "Cyrillic" '((setup-function . setup-cyrillic-environment)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
207 (charset . (cyrillic-iso8859-5))
17085
4dafa5431293 Change coding system name koi8 to koi8-r.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
208 (coding-system . (iso-8859-5 koi8 alternativnyj))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
209 (documentation . t)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
210 (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!")))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
211
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
212 ;;; cyrillic.el ends here