comparison src/file-coding.c @ 3302:3d54e5f2dfb0

[xemacs-hg @ 2006-03-26 13:05:14 by stephent] Make {en,de}code-coding-region interactive commands. <877j6hnyuj.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Sun, 26 Mar 2006 13:05:17 +0000
parents d674024a8674
children e13aec8357bb
comparison
equal deleted inserted replaced
3301:abb6e10c1d05 3302:3d54e5f2dfb0
2286 Lstream_delete (XLSTREAM (lb_outstream)); 2286 Lstream_delete (XLSTREAM (lb_outstream));
2287 return make_int (retlen); 2287 return make_int (retlen);
2288 } 2288 }
2289 } 2289 }
2290 2290
2291 DEFUN ("decode-coding-region", Fdecode_coding_region, 3, 4, 0, /* 2291 DEFUN ("decode-coding-region", Fdecode_coding_region, 3, 4,
2292 "*r\nzDecode from coding system: \ni", /*
2292 Decode the text between START and END which is encoded in CODING-SYSTEM. 2293 Decode the text between START and END which is encoded in CODING-SYSTEM.
2293 This is useful if you've read in encoded text from a file without decoding 2294 This is useful if you've read in encoded text from a file without decoding
2294 it (e.g. you read in a JIS-formatted file but used the `binary' or 2295 it (e.g. you read in a JIS-formatted file but used the `binary' or
2295 `no-conversion' coding system, so that it shows up as "^[$B!<!+^[(B"). 2296 `no-conversion' coding system, so that it shows up as "^[$B!<!+^[(B").
2296 Return length of decoded text. 2297 Return length of decoded text.
2297 BUFFER defaults to the current buffer if unspecified. 2298 BUFFER defaults to the current buffer if unspecified, and when interactive.
2298 */ 2299 */
2299 (start, end, coding_system, buffer)) 2300 (start, end, coding_system, buffer))
2300 { 2301 {
2301 return encode_decode_coding_region (start, end, coding_system, buffer, 2302 return encode_decode_coding_region (start, end, coding_system, buffer,
2302 CODING_DECODE); 2303 CODING_DECODE);
2303 } 2304 }
2304 2305
2305 DEFUN ("encode-coding-region", Fencode_coding_region, 3, 4, 0, /* 2306 DEFUN ("encode-coding-region", Fencode_coding_region, 3, 4,
2307 "*r\nzEncode to coding system: \ni", /*
2306 Encode the text between START and END using CODING-SYSTEM. 2308 Encode the text between START and END using CODING-SYSTEM.
2307 This will, for example, convert Japanese characters into stuff such as 2309 This will, for example, convert Japanese characters into stuff such as
2308 "^[$B!<!+^[(B" if you use the JIS encoding. Return length of encoded 2310 "^[$B!<!+^[(B" if you use the JIS encoding. Return length of encoded text.
2309 text. BUFFER defaults to the current buffer if unspecified. 2311 BUFFER defaults to the current buffer if unspecified, and when interactive.
2310 */ 2312 */
2311 (start, end, coding_system, buffer)) 2313 (start, end, coding_system, buffer))
2312 { 2314 {
2313 return encode_decode_coding_region (start, end, coding_system, buffer, 2315 return encode_decode_coding_region (start, end, coding_system, buffer,
2314 CODING_ENCODE); 2316 CODING_ENCODE);