Mercurial > hg > xemacs-beta
comparison lisp/mule/mule-coding.el @ 5118:e0db3c197671 ben-lisp-object
merge up to latest default branch, doesn't compile yet
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 26 Dec 2009 21:18:49 -0600 |
parents | 257b468bf2ca |
children | 308d34e9f07d |
comparison
equal
deleted
inserted
replaced
5117:3742ea8250b5 | 5118:e0db3c197671 |
---|---|
99 'ctext 'iso2022 | 99 'ctext 'iso2022 |
100 "Compound Text" | 100 "Compound Text" |
101 '(charset-g0 ascii | 101 '(charset-g0 ascii |
102 charset-g1 latin-iso8859-1 | 102 charset-g1 latin-iso8859-1 |
103 eol-type nil | 103 eol-type nil |
104 safe-charsets t ;; Reasonable | |
104 mnemonic "CText")) | 105 mnemonic "CText")) |
105 | |
106 (make-coding-system | |
107 'iso-8859-1 'no-conversion | |
108 "ISO-8859-1 (Latin-1)" | |
109 '(eol-type nil mnemonic "Noconv")) | |
110 | 106 |
111 (make-coding-system | 107 (make-coding-system |
112 'iso-2022-8bit-ss2 'iso2022 | 108 'iso-2022-8bit-ss2 'iso2022 |
113 "ISO-2022 8-bit w/SS2" | 109 "ISO-2022 8-bit w/SS2" |
114 '(charset-g0 ascii | 110 '(charset-g0 ascii |
115 charset-g1 latin-iso8859-1 | 111 charset-g1 latin-iso8859-1 |
116 charset-g2 t ;; unspecified but can be used later. | 112 charset-g2 t ;; unspecified but can be used later. |
117 short t | 113 short t |
114 safe-charsets (ascii katakana-jisx0201 japanese-jisx0208-1978 | |
115 japanese-jisx0208 japanese-jisx0212 japanese-jisx0213-1 | |
116 japanese-jisx0213-2) | |
118 mnemonic "ISO8/SS" | 117 mnemonic "ISO8/SS" |
119 documentation "ISO 2022 based 8-bit encoding using SS2 for 96-charset" | 118 documentation "ISO 2022 based 8-bit encoding using SS2 for 96-charset" |
120 )) | 119 )) |
121 | 120 |
122 (make-coding-system | 121 (make-coding-system |
124 "ISO-2022 7-bit w/SS2" | 123 "ISO-2022 7-bit w/SS2" |
125 '(charset-g0 ascii | 124 '(charset-g0 ascii |
126 charset-g2 t ;; unspecified but can be used later. | 125 charset-g2 t ;; unspecified but can be used later. |
127 seven t | 126 seven t |
128 short t | 127 short t |
128 safe-charsets t | |
129 mnemonic "ISO7/SS" | 129 mnemonic "ISO7/SS" |
130 documentation "ISO 2022 based 7-bit encoding using SS2 for 96-charset" | 130 documentation "ISO 2022 based 7-bit encoding using SS2 for 96-charset" |
131 eol-type nil)) | 131 eol-type nil)) |
132 | 132 |
133 ;; (copy-coding-system 'iso-2022-7bit-ss2 'iso-2022-jp-2) | 133 ;; (copy-coding-system 'iso-2022-7bit-ss2 'iso-2022-jp-2) |
136 "ISO-2022-JP-2" | 136 "ISO-2022-JP-2" |
137 '(charset-g0 ascii | 137 '(charset-g0 ascii |
138 charset-g2 t ;; unspecified but can be used later. | 138 charset-g2 t ;; unspecified but can be used later. |
139 seven t | 139 seven t |
140 short t | 140 short t |
141 safe-charsets t | |
141 mnemonic "ISO7/SS" | 142 mnemonic "ISO7/SS" |
142 eol-type nil)) | 143 eol-type nil)) |
143 | 144 |
144 (make-coding-system | 145 (make-coding-system |
145 'iso-2022-7bit 'iso2022 | 146 'iso-2022-7bit 'iso2022 |
146 "ISO 2022 7-bit" | 147 "ISO 2022 7-bit" |
147 '(charset-g0 ascii | 148 '(charset-g0 ascii |
148 seven t | 149 seven t |
149 short t | 150 short t |
151 safe-charsets t | |
150 mnemonic "ISO7" | 152 mnemonic "ISO7" |
151 documentation "ISO-2022-based 7-bit encoding using only G0" | 153 documentation "ISO-2022-based 7-bit encoding using only G0" |
152 )) | 154 )) |
153 | 155 |
154 ;; compatibility for old XEmacsen | 156 ;; compatibility for old XEmacsen |
158 'iso-2022-8 'iso2022 | 160 'iso-2022-8 'iso2022 |
159 "ISO-2022 8-bit" | 161 "ISO-2022 8-bit" |
160 '(charset-g0 ascii | 162 '(charset-g0 ascii |
161 charset-g1 latin-iso8859-1 | 163 charset-g1 latin-iso8859-1 |
162 short t | 164 short t |
165 safe-charsets t | |
163 mnemonic "ISO8" | 166 mnemonic "ISO8" |
164 documentation "ISO-2022 eight-bit coding system. No single-shift or locking-shift." | 167 documentation "ISO-2022 eight-bit coding system. No single-shift or locking-shift." |
165 )) | 168 )) |
166 | 169 |
167 (make-coding-system | 170 (make-coding-system |
169 "Escape-Quoted (for .ELC files)" | 172 "Escape-Quoted (for .ELC files)" |
170 '(charset-g0 ascii | 173 '(charset-g0 ascii |
171 charset-g1 latin-iso8859-1 | 174 charset-g1 latin-iso8859-1 |
172 eol-type lf | 175 eol-type lf |
173 escape-quoted t | 176 escape-quoted t |
177 safe-charsets t | |
174 mnemonic "ESC/Quot" | 178 mnemonic "ESC/Quot" |
175 documentation "ISO-2022 eight-bit coding system with escape quoting; used for .ELC files." | 179 documentation "ISO-2022 eight-bit coding system with escape quoting; used for .ELC files." |
176 )) | 180 )) |
177 | 181 |
178 (make-coding-system | 182 (make-coding-system |
180 "ISO-2022 w/locking-shift" | 184 "ISO-2022 w/locking-shift" |
181 '(charset-g0 ascii | 185 '(charset-g0 ascii |
182 charset-g1 t ;; unspecified but can be used later. | 186 charset-g1 t ;; unspecified but can be used later. |
183 seven t | 187 seven t |
184 lock-shift t | 188 lock-shift t |
189 safe-charsets t | |
185 mnemonic "ISO7/Lock" | 190 mnemonic "ISO7/Lock" |
186 documentation "ISO-2022 coding system using Locking-Shift for 96-charset." | 191 documentation "ISO-2022 coding system using Locking-Shift for 96-charset." |
187 )) | 192 )) |
188 | 193 |
189 ;;; mule-coding.el ends here | 194 |
195 ;; This is used by people writing CCL programs, but is called at runtime. | |
196 (defun define-translation-hash-table (symbol table) | |
197 "Define SYMBOL as the name of the hash translation TABLE for use in CCL. | |
198 | |
199 Analogous to `define-translation-table', but updates | |
200 `translation-hash-table-vector' and the table is for use in the CCL | |
201 `lookup-integer' and `lookup-character' functions." | |
202 (check-argument-type #'symbolp symbol) | |
203 (check-argument-type #'hash-table-p table) | |
204 (let ((len (length translation-hash-table-vector)) | |
205 (id 0) | |
206 done) | |
207 (put symbol 'translation-hash-table table) | |
208 (while (not done) | |
209 (if (>= id len) | |
210 (setq translation-hash-table-vector | |
211 (vconcat translation-hash-table-vector [nil]))) | |
212 (let ((slot (aref translation-hash-table-vector id))) | |
213 (if (or (not slot) | |
214 (eq (car slot) symbol)) | |
215 (progn | |
216 (aset translation-hash-table-vector id (cons symbol table)) | |
217 (setq done t)) | |
218 (setq id (1+ id))))) | |
219 (put symbol 'translation-hash-table-id id) | |
220 id)) | |
221 | |
222 ;; Ideally this would be in latin.el, but code-init.el uses it. | |
223 (make-coding-system | |
224 'iso-8859-1 | |
225 'fixed-width | |
226 "ISO-8859-1 (Latin-1)" | |
227 (eval-when-compile | |
228 `(unicode-map | |
229 ,(loop | |
230 for i from #x80 to #xff | |
231 collect (list i (int-char i))) ;; Identical to Latin-1. | |
232 mnemonic "Latin 1" | |
233 documentation "The most used encoding of Western Europe and the Americas." | |
234 aliases (iso-latin-1 latin-1)))) |