comparison lisp/mule/japanese.el @ 4568:1d74a1d115ee

Add #'query-coding-region tests; do the work necessary to get them running. lisp/ChangeLog addition: 2008-12-28 Aidan Kehoe <kehoea@parhasard.net> * coding.el (default-query-coding-region): Declare using defun*, so we can #'return-from to it on encountering a safe-charsets value of t. Comment out a few debug messages. (query-coding-region): Correct the docstring, it deals with a region, not a string. (unencodable-char-position): Correct the implementation for non-nil COUNT, special-case a zero value for count, treat it as one. Don't rely on dynamic scope when calling the main lambda. * unicode.el (unicode-query-coding-region): Comment out some debug messages here. * mule/mule-coding.el (8-bit-fixed-query-coding-region): Comment out some debug messages here. * code-init.el (raw-text): Add a safe-charsets property to this coding system. * mule/korean.el (iso-2022-int-1): * mule/korean.el (euc-kr): * mule/korean.el (iso-2022-kr): Add safe-charsets properties for these coding systems. * mule/japanese.el (iso-2022-jp): * mule/japanese.el (jis7): * mule/japanese.el (jis8): * mule/japanese.el (shift-jis): * mule/japanese.el (iso-2022-jp-1978-irv): * mule/japanese.el (euc-jp): Add safe-charsets properties for all these coding systems. * mule/iso-with-esc.el: Add safe-charsets properties to all the coding systems in here. Comment on the downside of a safe-charsets value of t for iso-latin-1-with-esc. * mule/hebrew.el (ctext-hebrew): Add a safe-charsets property for this coding system. * mule/devanagari.el (in-is13194-devanagari): Add a safe-charsets property for this coding system. * mule/chinese.el (cn-gb-2312): * mule/chinese.el (hz-gb-2312): * mule/chinese.el (big5): Add safe-charsets properties for these coding systems. * mule/latin.el (iso-8859-14): Add an implementation for this, using #'make-8-bit-coding-system. * mule/mule-coding.el (ctext): * mule/mule-coding.el (iso-2022-8bit-ss2): * mule/mule-coding.el (iso-2022-7bit-ss2): * mule/mule-coding.el (iso-2022-jp-2): * mule/mule-coding.el (iso-2022-7bit): * mule/mule-coding.el (iso-2022-8): * mule/mule-coding.el (escape-quoted): * mule/mule-coding.el (iso-2022-lock): Add safe-charsets properties for all these coding systems. src/ChangeLog addition: 2008-12-28 Aidan Kehoe <kehoea@parhasard.net> * file-coding.c (Fmake_coding_system): Document our use of the safe-chars and safe-charsets properties, and the differences compared to GNU. (make_coding_system_1): Don't drop the safe-chars and safe-charsets properties. (Fcoding_system_property): Return the safe-chars and safe-charsets properties when asked for them. * file-coding.h (CODING_SYSTEM_SAFE_CHARSETS): * coding-system-slots.h: Make the safe-chars and safe-charsets slots available in these headers. tests/ChangeLog addition: 2008-12-28 Aidan Kehoe <kehoea@parhasard.net> * automated/query-coding-tests.el: New file, testing the functionality of #'query-coding-region and #'query-coding-string.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 28 Dec 2008 14:46:24 +0000
parents edb00a8b4eff
children 311f6817efc2 308d34e9f07d
comparison
equal deleted inserted replaced
4567:84d618b355f5 4568:1d74a1d115ee
193 '(charset-g0 ascii 193 '(charset-g0 ascii
194 short t 194 short t
195 seven t 195 seven t
196 input-charset-conversion ((latin-jisx0201 ascii) 196 input-charset-conversion ((latin-jisx0201 ascii)
197 (japanese-jisx0208-1978 japanese-jisx0208)) 197 (japanese-jisx0208-1978 japanese-jisx0208))
198 safe-charsets (ascii japanese-jisx0208-1978 japanese-jisx0208
199 latin-jisx0201 japanese-jisx0212 katakana-jisx0201)
198 mnemonic "MULE/7bit" 200 mnemonic "MULE/7bit"
199 documentation 201 documentation
200 "Coding system used for communication with mail and news in Japan." 202 "Coding system used for communication with mail and news in Japan."
201 )) 203 ))
202 204
208 short t 210 short t
209 seven t 211 seven t
210 lock-shift t 212 lock-shift t
211 input-charset-conversion ((latin-jisx0201 ascii) 213 input-charset-conversion ((latin-jisx0201 ascii)
212 (japanese-jisx0208-1978 japanese-jisx0208)) 214 (japanese-jisx0208-1978 japanese-jisx0208))
215 safe-charsets (latin-jisx0201 ascii japanese-jisx0208-1978 japanese-jisx0208)
213 mnemonic "JIS7" 216 mnemonic "JIS7"
214 documentation 217 documentation
215 "Old JIS 7-bit encoding; mostly superseded by ISO-2022-JP. 218 "Old JIS 7-bit encoding; mostly superseded by ISO-2022-JP.
216 Uses locking-shift (SI/SO) to select half-width katakana." 219 Uses locking-shift (SI/SO) to select half-width katakana."
217 )) 220 ))
222 '(charset-g0 ascii 225 '(charset-g0 ascii
223 charset-g1 katakana-jisx0201 226 charset-g1 katakana-jisx0201
224 short t 227 short t
225 input-charset-conversion ((latin-jisx0201 ascii) 228 input-charset-conversion ((latin-jisx0201 ascii)
226 (japanese-jisx0208-1978 japanese-jisx0208)) 229 (japanese-jisx0208-1978 japanese-jisx0208))
230 safe-charsets (latin-jisx0201 ascii japanese-jisx0208-1978
231 japanese-jisx0208)
227 mnemonic "JIS8" 232 mnemonic "JIS8"
228 documentation 233 documentation
229 "Old JIS 8-bit encoding; mostly superseded by ISO-2022-JP. 234 "Old JIS 8-bit encoding; mostly superseded by ISO-2022-JP.
230 Uses high bytes for half-width katakana." 235 Uses high bytes for half-width katakana."
231 )) 236 ))
259 (make-coding-system 264 (make-coding-system
260 'shift-jis 'shift-jis 265 'shift-jis 'shift-jis
261 "Shift-JIS" 266 "Shift-JIS"
262 '(mnemonic "Ja/SJIS" 267 '(mnemonic "Ja/SJIS"
263 documentation "The standard Japanese encoding in MS Windows." 268 documentation "The standard Japanese encoding in MS Windows."
269 safe-charsets (ascii japanese-jisx0208 japanese-jisx0208-1978
270 latin-jisx0201 katakana-jisx0201)
264 )) 271 ))
265 272
266 ;; A former name? 273 ;; A former name?
267 (define-coding-system-alias 'shift_jis 'shift-jis) 274 (define-coding-system-alias 'shift_jis 'shift-jis)
268 275
284 '(charset-g0 ascii 291 '(charset-g0 ascii
285 short t 292 short t
286 seven t 293 seven t
287 output-charset-conversion ((ascii latin-jisx0201) 294 output-charset-conversion ((ascii latin-jisx0201)
288 (japanese-jisx0208 japanese-jisx0208-1978)) 295 (japanese-jisx0208 japanese-jisx0208-1978))
296 safe-charsets (ascii latin-jisx0201 japanese-jisx0208
297 japanese-jisx0208-1978)
289 documentation 298 documentation
290 "This is a coding system used for old JIS terminals. It's an ISO 299 "This is a coding system used for old JIS terminals. It's an ISO
291 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman." 300 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman."
292 mnemonic "Ja-78/7bit" 301 mnemonic "Ja-78/7bit"
293 )) 302 ))
312 "Japanese EUC" 321 "Japanese EUC"
313 '(charset-g0 ascii 322 '(charset-g0 ascii
314 charset-g1 japanese-jisx0208 323 charset-g1 japanese-jisx0208
315 charset-g2 katakana-jisx0201 324 charset-g2 katakana-jisx0201
316 charset-g3 japanese-jisx0212 325 charset-g3 japanese-jisx0212
326 safe-charsets (ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212)
317 short t 327 short t
318 mnemonic "Ja/EUC" 328 mnemonic "Ja/EUC"
319 documentation 329 documentation
320 "Japanese EUC (Extended Unix Code), the standard Japanese encoding in Unix. 330 "Japanese EUC (Extended Unix Code), the standard Japanese encoding in Unix.
321 Equivalent MIME encoding: EUC-JP. 331 Equivalent MIME encoding: EUC-JP.