annotate lisp/language/cyrillic.el @ 159:3bb7ccffb0c0 r20-3b6

Import from CVS: tag r20-3b6
author cvs
date Mon, 13 Aug 2007 09:41:43 +0200
parents
children 5a88923fcbfe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
1 ;;; cyrillic.el --- Support for languages which use Cyrillic characters
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
2
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
5 ;; Copyright (C) 1997 MORIOKA Tomohiko
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
6
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
7 ;; Keywords: multilingual, Cyrillic
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
8
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
10
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
14 ;; any later version.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
15
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
19 ;; General Public License for more details.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
20
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
24 ;; 02111-1307, USA.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
25
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
26 ;;; Commentary:
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
27
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
28 ;; The character set ISO8859-5 is supported. KOI-8 and ALTERNATIVNYJ
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
29 ;; are converted to ISO8859-5 internally.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
30
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
31 ;;; Code:
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
33 ;; For syntax of Cyrillic
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
34 (modify-syntax-entry 'cyrillic-iso8859-5 "w")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
35 (modify-syntax-entry ?,L-(B ".")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
36 (modify-syntax-entry ?,Lp(B ".")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
37 (modify-syntax-entry ?,L}(B ".")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
38
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
39 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
40 ;;; CYRILLIC
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
41 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
42
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
43 (define-language-environment 'cyrillic
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
44 "Cyrillic"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
45 (lambda ()
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
46 (set-coding-category-system 'iso-8-designate 'iso-8859-5)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
47 (set-coding-priority-list '(iso-8-designate iso-8-1))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
48 (set-default-buffer-file-coding-system 'iso-8859-5)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
49 (setq terminal-coding-system 'iso-8859-5)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
50 (setq keyboard-coding-system 'iso-8859-5)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
51 ;; (setq-default quail-current-package
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
52 ;; (assoc "yawerty" quail-package-alist))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
53 ))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
54
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
55 ;; ISO-8859-5 staff
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
56
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
57 ;; (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
58 ;; 'iso-8859-5 2 ?5 "MIME ISO-8859-5"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
59 ;; '((ascii t) (cyrillic-iso8859-5 t) nil nil
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
60 ;; nil ascii-eol ascii-cntl nil nil nil nil))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
61
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
62 (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
63 'iso-8859-5 'iso2022
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
64 "MIME ISO-8859-5"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
65 '(charset-g0 ascii
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
66 charset-g1 cyrillic-iso8859-5
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
67 charset-g2 t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
68 charset-g3 t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
69 mnemonic "ISO8/Cyr"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
70 ))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
71
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
72 ;; KOI-8 staff
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
73
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
74 (define-ccl-program ccl-decode-koi8
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
75 '(((read r0)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
76 (loop
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
77 (write-read-repeat
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
78 r0
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
79 [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
80 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
81 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
82 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
83 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
84 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
85 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
86 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
87 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
88 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
89 32 32 32 ?,Lq(B 32 32 32 32 32 32 32 32 32 32 32 32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
90 32 32 32 ?,L!(B 32 32 32 32 32 32 32 32 32 32 32 32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
91 ?,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
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
92 ?,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
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
93 ?,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
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
94 ?,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 ]))))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
95 "CCL program to decode KOI8.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
96
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
97 (define-ccl-program ccl-encode-koi8
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
98 '(((read r0)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
99 (loop
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
100 (if (r0 != 140) ; lc-crl == 140
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
101 (write-read-repeat r0)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
102 ((read r0)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
103 (r0 -= 160)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
104 (write-read-repeat
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
105 r0
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
106 [ 32 179 32 32 32 32 32 32 32 32 32 32 32 32 32 32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
107 225 226 247 231 228 229 246 250 233 234 235 236 237 238 239 240
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
108 242 243 244 245 230 232 227 254 251 253 255 249 248 252 224 241
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
109 193 194 215 199 196 197 214 218 201 202 203 204 205 206 207 208
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
110 210 211 212 213 198 200 195 222 219 221 223 217 216 220 192 209
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
111 32 163 32 32 32 32 32 32 32 32 32 32 32 32 32 32])
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
112 )))))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
113 "CCL program to encode KOI8.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
114
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
115 ;; (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
116 ;; 'koi8-r 4
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
117 ;; ?K "Coding-system used for KOI8."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
118 ;; (cons ccl-decode-koi8 ccl-encode-koi8))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
119
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
120 (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
121 'koi8-r 'ccl
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
122 "Coding-system used for KOI8."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
123 `(decode ,ccl-decode-koi8
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
124 encode ,ccl-encode-koi8
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
125 mnemonic "KOI8"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
126
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
127 ;;(define-coding-system-alias 'koi8-r 'koi8)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
128
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
129 (define-ccl-program ccl-encode-koi8-font
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
130 '(((r1 -= 160)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
131 (r1 = r1
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
132 [ 32 179 32 32 32 32 32 32 32 32 32 32 32 32 32 32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
133 225 226 247 231 228 229 246 250 233 234 235 236 237 238 239 240
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
134 242 243 244 245 230 232 227 254 251 253 255 249 248 252 224 241
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
135 193 194 215 199 196 197 214 218 201 202 203 204 205 206 207 208
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
136 210 211 212 213 198 200 195 222 219 221 223 217 216 220 192 209
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
137 32 163 32 32 32 32 32 32 32 32 32 32 32 32 32 32])
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
138 ))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
139 "CCL program to encode Cyrillic chars to KOI font.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
140
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
141 ;; (setq font-ccl-encoder-alist
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
142 ;; (cons (cons "koi8" ccl-encode-koi8-font) font-ccl-encoder-alist))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
143
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
144 ;;; ALTERNATIVNYJ staff
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
145
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
146 (define-ccl-program ccl-decode-alternativnyj
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
147 '(((read r0)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
148 (loop
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
149 (write-read-repeat
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
150 r0
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
151 [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
152 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
153 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
154 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
155 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
156 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
157 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
158 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
159 ?,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
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
160 ?,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
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
161 ?,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
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
162 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
163 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
164 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
165 ?,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
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
166 ?,L!(B ?,Lq(B 32 32 32 32 32 32 32 32 32 32 32 32 32 ?,Lp(B]))))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
167 "CCL program to decode Alternativnyj.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
168
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
169 (define-ccl-program ccl-encode-alternativnyj
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
170 '(((read r0)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
171 (loop
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
172 (if (r0 != 140) ; lc-crl == 140
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
173 (write-read-repeat r0)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
174 ((read r0)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
175 (r0 -= 160)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
176 (write-read-repeat
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
177 r0
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
178 [ 32 240 32 32 32 32 32 32 32 32 32 32 32 32 32 32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
179 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
180 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
181 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
182 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
183 255 241 32 32 32 32 32 32 32 32 32 32 32 32 32 32])
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
184 )))))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
185 "CCL program to encode Alternativnyj.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
186
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
187 ;; (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
188 ;; 'alternativnyj 4
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
189 ;; ?A "Coding-system used for Alternativnyj"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
190 ;; (cons ccl-decode-alternativnyj ccl-encode-alternativnyj))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
191
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
192 (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
193 'alternativnyj 'ccl
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
194 "Coding-system used for Alternativnyj"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
195 `(decode ,ccl-decode-alternativnyj
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
196 encode ,ccl-encode-alternativnyj
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
197 mnemonic "Cy.Alt"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
198
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
199 (define-ccl-program ccl-encode-alternativnyj-font
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
200 '(((r1 -= 160)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
201 (r1 = r1
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
202 [ 32 240 32 32 32 32 32 32 32 32 32 32 32 32 32 32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
203 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
204 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
205 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
206 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
207 255 241 32 32 32 32 32 32 32 32 32 32 32 32 32 32])
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
208 ))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
209 "CCL program to encode Cyrillic chars to Alternativnyj font.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
210
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
211 ;; (setq font-ccl-encoder-alist
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
212 ;; (cons (cons "alternativnyj" ccl-encode-alternativnyj-font)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
213 ;; font-ccl-encoder-alist))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
214
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
215 ;;; GENERAL
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
216
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
217 (register-input-method
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
218 "Cyrillic" '("quail-jcuken" quail-use-package "quail/cyrillic"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
219 (register-input-method
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
220 "Cyrillic" '("quail-macedonian" quail-use-package "quail/cyrillic"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
221 (register-input-method
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
222 "Cyrillic" '("quail-serbian" quail-use-package "quail/cyrillic"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
223 (register-input-method
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
224 "Cyrillic" '("quail-beylorussian" quail-use-package "quail/cyrillic"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
225 (register-input-method
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
226 "Cyrillic" '("quail-ukrainian" quail-use-package "quail/cyrillic"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
227 (register-input-method
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
228 "Cyrillic" '("quail-yawerty" quail-use-package "quail/cyrillic"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
229
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
230 (defun setup-cyrillic-environment ()
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
231 "Setup multilingual environment for Cyrillic users."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
232 (interactive)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
233 (setq primary-language "Cyrillic")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
234
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
235 (setq coding-category-iso-8-1 'iso-8859-5)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
236
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
237 (set-coding-priority
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
238 '(coding-category-iso-7
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
239 coding-category-iso-8-1))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
240
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
241 (setq-default buffer-file-coding-system 'iso-8859-5)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
242 (set-terminal-coding-system 'iso-8859-5)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
243 (set-keyboard-coding-system 'iso-8859-5)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
244
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
245 (setq default-input-method '("Cyrillic" . "quail-yawerty"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
246 )
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
247
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
248 (defun describe-cyrillic-support ()
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
249 "Describe how Emacs support Cyrillic."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
250 (interactive)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
251 (describe-language-support-internal "Cyrillic"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
252
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
253 (set-language-info-alist
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
254 "Cyrillic" '((setup-function . setup-cyrillic-environment)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
255 (describe-function . describe-cyrillic-support)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
256 (charset . (cyrillic-iso8859-5))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
257 (coding-system . (iso-8859-5 koi8 alternativnyj))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
258 (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
259 (documentation . nil)))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
260
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
261 ;;; cyrillic.el ends here