diff options
| author | Kenichi Handa | 1997-08-10 04:13:19 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-08-10 04:13:19 +0000 |
| commit | c48253582579366ea68bd2c13692e35b8f279cf4 (patch) | |
| tree | 35e2d7eae64dca3b63d50dbb7d5950a6689f4907 /src/coding.c | |
| parent | fbaa2ed9b59409b435694863e27059c79c73f231 (diff) | |
| download | emacs-c48253582579366ea68bd2c13692e35b8f279cf4.tar.gz emacs-c48253582579366ea68bd2c13692e35b8f279cf4.zip | |
(ENCODE_ISO_CHARACTER_DIMENSION1): Pay attention to
CODING_FLAG_ISO_SAFE.
(ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
(safe_terminal_coding): New variable.
(Fset_safe_terminal_coding_system_internal): New function.
(init_coding_once): Initilize safe_terminal_coding.
(syms_of_coding): Declare set-safe-terminal-coding-system as a
Lisp function.
(Vmicrosoft_code_table): New variable.
(syms_of_coding): Declare it as a Lisp variable and initialize it.
(detect_coding_mask): Pay attention to Vmicrosoft_code_table.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 289 |
1 files changed, 177 insertions, 112 deletions
diff --git a/src/coding.c b/src/coding.c index 5be5485bb1b..beb4de911dc 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -278,13 +278,21 @@ Lisp_Object Vcoding_system_for_write; | |||
| 278 | /* Coding-system actually used in the latest I/O. */ | 278 | /* Coding-system actually used in the latest I/O. */ |
| 279 | Lisp_Object Vlast_coding_system_used; | 279 | Lisp_Object Vlast_coding_system_used; |
| 280 | 280 | ||
| 281 | /* A vector of length 256 which contains information about special | ||
| 282 | Microsoft codes. */ | ||
| 283 | Lisp_Object Vmicrosoft_code_table; | ||
| 284 | |||
| 281 | /* Flag to inhibit code conversion of end-of-line format. */ | 285 | /* Flag to inhibit code conversion of end-of-line format. */ |
| 282 | int inhibit_eol_conversion; | 286 | int inhibit_eol_conversion; |
| 283 | 287 | ||
| 284 | /* Coding-system of what terminal accept for displaying. */ | 288 | /* Coding system to be used to encode text for terminal display. */ |
| 285 | struct coding_system terminal_coding; | 289 | struct coding_system terminal_coding; |
| 286 | 290 | ||
| 287 | /* Coding-system of what is sent from terminal keyboard. */ | 291 | /* Coding system to be used to encode text for terminal display when |
| 292 | terminal coding system is nil. */ | ||
| 293 | struct coding_system safe_terminal_coding; | ||
| 294 | |||
| 295 | /* Coding system of what is sent from terminal keyboard. */ | ||
| 288 | struct coding_system keyboard_coding; | 296 | struct coding_system keyboard_coding; |
| 289 | 297 | ||
| 290 | Lisp_Object Vfile_coding_system_alist; | 298 | Lisp_Object Vfile_coding_system_alist; |
| @@ -681,7 +689,16 @@ detect_coding_iso2022 (src, src_end) | |||
| 681 | if (c < 0x80) | 689 | if (c < 0x80) |
| 682 | break; | 690 | break; |
| 683 | else if (c < 0xA0) | 691 | else if (c < 0xA0) |
| 684 | return 0; | 692 | { |
| 693 | if (VECTORP (Vmicrosoft_code_table) | ||
| 694 | && !NILP (XVECTOR (Vmicrosoft_code_table)->contents[c])) | ||
| 695 | { | ||
| 696 | mask &= ~(CODING_CATEGORY_MASK_ISO_7 | ||
| 697 | | CODING_CATEGORY_MASK_ISO_7_ELSE); | ||
| 698 | break; | ||
| 699 | } | ||
| 700 | return 0; | ||
| 701 | } | ||
| 685 | else | 702 | else |
| 686 | { | 703 | { |
| 687 | unsigned char *src_begin = src; | 704 | unsigned char *src_begin = src; |
| @@ -1165,66 +1182,88 @@ decode_coding_iso2022 (coding, source, destination, | |||
| 1165 | sequences are also produced in advance if necessary. */ | 1182 | sequences are also produced in advance if necessary. */ |
| 1166 | 1183 | ||
| 1167 | 1184 | ||
| 1168 | #define ENCODE_ISO_CHARACTER_DIMENSION1(charset, c1) \ | 1185 | #define ENCODE_ISO_CHARACTER_DIMENSION1(charset, c1) \ |
| 1169 | do { \ | 1186 | do { \ |
| 1170 | if (CODING_SPEC_ISO_SINGLE_SHIFTING (coding)) \ | 1187 | if (CODING_SPEC_ISO_SINGLE_SHIFTING (coding)) \ |
| 1171 | { \ | 1188 | { \ |
| 1172 | if (coding->flags & CODING_FLAG_ISO_SEVEN_BITS) \ | 1189 | if (coding->flags & CODING_FLAG_ISO_SEVEN_BITS) \ |
| 1173 | *dst++ = c1 & 0x7F; \ | 1190 | *dst++ = c1 & 0x7F; \ |
| 1174 | else \ | 1191 | else \ |
| 1175 | *dst++ = c1 | 0x80; \ | 1192 | *dst++ = c1 | 0x80; \ |
| 1176 | CODING_SPEC_ISO_SINGLE_SHIFTING (coding) = 0; \ | 1193 | CODING_SPEC_ISO_SINGLE_SHIFTING (coding) = 0; \ |
| 1177 | break; \ | 1194 | break; \ |
| 1178 | } \ | 1195 | } \ |
| 1179 | else if (charset == CODING_SPEC_ISO_PLANE_CHARSET (coding, 0)) \ | 1196 | else if (charset == CODING_SPEC_ISO_PLANE_CHARSET (coding, 0)) \ |
| 1180 | { \ | 1197 | { \ |
| 1181 | *dst++ = c1 & 0x7F; \ | 1198 | *dst++ = c1 & 0x7F; \ |
| 1182 | break; \ | 1199 | break; \ |
| 1183 | } \ | 1200 | } \ |
| 1184 | else if (charset == CODING_SPEC_ISO_PLANE_CHARSET (coding, 1)) \ | 1201 | else if (charset == CODING_SPEC_ISO_PLANE_CHARSET (coding, 1)) \ |
| 1185 | { \ | 1202 | { \ |
| 1186 | *dst++ = c1 | 0x80; \ | 1203 | *dst++ = c1 | 0x80; \ |
| 1187 | break; \ | 1204 | break; \ |
| 1188 | } \ | 1205 | } \ |
| 1189 | else \ | 1206 | else if (coding->flags & CODING_FLAG_ISO_SAFE \ |
| 1190 | /* Since CHARSET is not yet invoked to any graphic planes, we \ | 1207 | && (CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) \ |
| 1191 | must invoke it, or, at first, designate it to some graphic \ | 1208 | == CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION)) \ |
| 1192 | register. Then repeat the loop to actually produce the \ | 1209 | { \ |
| 1193 | character. */ \ | 1210 | /* We should not encode this character, instead produce one or \ |
| 1194 | dst = encode_invocation_designation (charset, coding, dst); \ | 1211 | two `?'s. */ \ |
| 1212 | *dst++ = CODING_INHIBIT_CHARACTER_SUBSTITUTION; \ | ||
| 1213 | if (CHARSET_WIDTH (charset) == 2) \ | ||
| 1214 | *dst++ = CODING_INHIBIT_CHARACTER_SUBSTITUTION; \ | ||
| 1215 | break; \ | ||
| 1216 | } \ | ||
| 1217 | else \ | ||
| 1218 | /* Since CHARSET is not yet invoked to any graphic planes, we \ | ||
| 1219 | must invoke it, or, at first, designate it to some graphic \ | ||
| 1220 | register. Then repeat the loop to actually produce the \ | ||
| 1221 | character. */ \ | ||
| 1222 | dst = encode_invocation_designation (charset, coding, dst); \ | ||
| 1195 | } while (1) | 1223 | } while (1) |
| 1196 | 1224 | ||
| 1197 | /* Produce codes for a DIMENSION2 character whose character set is | 1225 | /* Produce codes for a DIMENSION2 character whose character set is |
| 1198 | CHARSET and whose position-codes are C1 and C2. Designation and | 1226 | CHARSET and whose position-codes are C1 and C2. Designation and |
| 1199 | invocation codes are also produced in advance if necessary. */ | 1227 | invocation codes are also produced in advance if necessary. */ |
| 1200 | 1228 | ||
| 1201 | #define ENCODE_ISO_CHARACTER_DIMENSION2(charset, c1, c2) \ | 1229 | #define ENCODE_ISO_CHARACTER_DIMENSION2(charset, c1, c2) \ |
| 1202 | do { \ | 1230 | do { \ |
| 1203 | if (CODING_SPEC_ISO_SINGLE_SHIFTING (coding)) \ | 1231 | if (CODING_SPEC_ISO_SINGLE_SHIFTING (coding)) \ |
| 1204 | { \ | 1232 | { \ |
| 1205 | if (coding->flags & CODING_FLAG_ISO_SEVEN_BITS) \ | 1233 | if (coding->flags & CODING_FLAG_ISO_SEVEN_BITS) \ |
| 1206 | *dst++ = c1 & 0x7F, *dst++ = c2 & 0x7F; \ | 1234 | *dst++ = c1 & 0x7F, *dst++ = c2 & 0x7F; \ |
| 1207 | else \ | 1235 | else \ |
| 1208 | *dst++ = c1 | 0x80, *dst++ = c2 | 0x80; \ | 1236 | *dst++ = c1 | 0x80, *dst++ = c2 | 0x80; \ |
| 1209 | CODING_SPEC_ISO_SINGLE_SHIFTING (coding) = 0; \ | 1237 | CODING_SPEC_ISO_SINGLE_SHIFTING (coding) = 0; \ |
| 1210 | break; \ | 1238 | break; \ |
| 1211 | } \ | 1239 | } \ |
| 1212 | else if (charset == CODING_SPEC_ISO_PLANE_CHARSET (coding, 0)) \ | 1240 | else if (charset == CODING_SPEC_ISO_PLANE_CHARSET (coding, 0)) \ |
| 1213 | { \ | 1241 | { \ |
| 1214 | *dst++ = c1 & 0x7F, *dst++= c2 & 0x7F; \ | 1242 | *dst++ = c1 & 0x7F, *dst++= c2 & 0x7F; \ |
| 1215 | break; \ | 1243 | break; \ |
| 1216 | } \ | 1244 | } \ |
| 1217 | else if (charset == CODING_SPEC_ISO_PLANE_CHARSET (coding, 1)) \ | 1245 | else if (charset == CODING_SPEC_ISO_PLANE_CHARSET (coding, 1)) \ |
| 1218 | { \ | 1246 | { \ |
| 1219 | *dst++ = c1 | 0x80, *dst++= c2 | 0x80; \ | 1247 | *dst++ = c1 | 0x80, *dst++= c2 | 0x80; \ |
| 1220 | break; \ | 1248 | break; \ |
| 1221 | } \ | 1249 | } \ |
| 1222 | else \ | 1250 | else if (coding->flags & CODING_FLAG_ISO_SAFE \ |
| 1223 | /* Since CHARSET is not yet invoked to any graphic planes, we \ | 1251 | && (CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) \ |
| 1224 | must invoke it, or, at first, designate it to some graphic \ | 1252 | == CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION)) \ |
| 1225 | register. Then repeat the loop to actually produce the \ | 1253 | { \ |
| 1226 | character. */ \ | 1254 | /* We should not encode this character, instead produce one or \ |
| 1227 | dst = encode_invocation_designation (charset, coding, dst); \ | 1255 | two `?'s. */ \ |
| 1256 | *dst++ = CODING_INHIBIT_CHARACTER_SUBSTITUTION; \ | ||
| 1257 | if (CHARSET_WIDTH (charset) == 2) \ | ||
| 1258 | *dst++ = CODING_INHIBIT_CHARACTER_SUBSTITUTION; \ | ||
| 1259 | break; \ | ||
| 1260 | } \ | ||
| 1261 | else \ | ||
| 1262 | /* Since CHARSET is not yet invoked to any graphic planes, we \ | ||
| 1263 | must invoke it, or, at first, designate it to some graphic \ | ||
| 1264 | register. Then repeat the loop to actually produce the \ | ||
| 1265 | character. */ \ | ||
| 1266 | dst = encode_invocation_designation (charset, coding, dst); \ | ||
| 1228 | } while (1) | 1267 | } while (1) |
| 1229 | 1268 | ||
| 1230 | #define ENCODE_ISO_CHARACTER(charset, c1, c2) \ | 1269 | #define ENCODE_ISO_CHARACTER(charset, c1, c2) \ |
| @@ -2331,7 +2370,9 @@ setup_coding_system (coding_system, coding) | |||
| 2331 | | (NILP (flags[11]) ? 0 : CODING_FLAG_ISO_USE_OLDJIS) | 2370 | | (NILP (flags[11]) ? 0 : CODING_FLAG_ISO_USE_OLDJIS) |
| 2332 | | (NILP (flags[12]) ? 0 : CODING_FLAG_ISO_NO_DIRECTION) | 2371 | | (NILP (flags[12]) ? 0 : CODING_FLAG_ISO_NO_DIRECTION) |
| 2333 | | (NILP (flags[13]) ? 0 : CODING_FLAG_ISO_INIT_AT_BOL) | 2372 | | (NILP (flags[13]) ? 0 : CODING_FLAG_ISO_INIT_AT_BOL) |
| 2334 | | (NILP (flags[14]) ? 0 : CODING_FLAG_ISO_DESIGNATE_AT_BOL)); | 2373 | | (NILP (flags[14]) ? 0 : CODING_FLAG_ISO_DESIGNATE_AT_BOL) |
| 2374 | | (NILP (flags[15]) ? 0 : CODING_FLAG_ISO_SAFE) | ||
| 2375 | ); | ||
| 2335 | 2376 | ||
| 2336 | /* Invoke graphic register 0 to plane 0. */ | 2377 | /* Invoke graphic register 0 to plane 0. */ |
| 2337 | CODING_SPEC_ISO_INVOCATION (coding, 0) = 0; | 2378 | CODING_SPEC_ISO_INVOCATION (coding, 0) = 0; |
| @@ -2415,34 +2456,35 @@ setup_coding_system (coding_system, coding) | |||
| 2415 | default_reg_bits &= 3; | 2456 | default_reg_bits &= 3; |
| 2416 | } | 2457 | } |
| 2417 | 2458 | ||
| 2418 | for (charset = 0; charset <= MAX_CHARSET; charset++) | 2459 | if (! (coding->flags & CODING_FLAG_ISO_SAFE)) |
| 2419 | if (CHARSET_VALID_P (charset) | 2460 | for (charset = 0; charset <= MAX_CHARSET; charset++) |
| 2420 | && (CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) | 2461 | if (CHARSET_VALID_P (charset) |
| 2421 | == CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION)) | 2462 | && (CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) |
| 2422 | { | 2463 | == CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION)) |
| 2423 | /* We have not yet decided where to designate CHARSET. */ | 2464 | { |
| 2424 | int reg_bits = default_reg_bits; | 2465 | /* We have not yet decided where to designate CHARSET. */ |
| 2425 | 2466 | int reg_bits = default_reg_bits; | |
| 2426 | if (CHARSET_CHARS (charset) == 96) | 2467 | |
| 2427 | /* A charset of CHARS96 can't be designated to REG 0. */ | 2468 | if (CHARSET_CHARS (charset) == 96) |
| 2428 | reg_bits &= ~1; | 2469 | /* A charset of CHARS96 can't be designated to REG 0. */ |
| 2429 | 2470 | reg_bits &= ~1; | |
| 2430 | if (reg_bits) | 2471 | |
| 2431 | /* There exist some default graphic register. */ | 2472 | if (reg_bits) |
| 2432 | CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) | 2473 | /* There exist some default graphic register. */ |
| 2433 | = (reg_bits & 1 | 2474 | CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) |
| 2434 | ? 0 : (reg_bits & 2 ? 1 : (reg_bits & 4 ? 2 : 3))); | 2475 | = (reg_bits & 1 |
| 2435 | else | 2476 | ? 0 : (reg_bits & 2 ? 1 : (reg_bits & 4 ? 2 : 3))); |
| 2436 | /* We anyway have to designate CHARSET to somewhere. */ | 2477 | else |
| 2437 | CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) | 2478 | /* We anyway have to designate CHARSET to somewhere. */ |
| 2438 | = (CHARSET_CHARS (charset) == 94 | 2479 | CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset) |
| 2439 | ? 0 | 2480 | = (CHARSET_CHARS (charset) == 94 |
| 2440 | : ((coding->flags & CODING_FLAG_ISO_LOCKING_SHIFT | 2481 | ? 0 |
| 2441 | || ! coding->flags & CODING_FLAG_ISO_SEVEN_BITS) | 2482 | : ((coding->flags & CODING_FLAG_ISO_LOCKING_SHIFT |
| 2442 | ? 1 | 2483 | || ! coding->flags & CODING_FLAG_ISO_SEVEN_BITS) |
| 2443 | : (coding->flags & CODING_FLAG_ISO_SINGLE_SHIFT | 2484 | ? 1 |
| 2444 | ? 2 : 0))); | 2485 | : (coding->flags & CODING_FLAG_ISO_SINGLE_SHIFT |
| 2445 | } | 2486 | ? 2 : 0))); |
| 2487 | } | ||
| 2446 | } | 2488 | } |
| 2447 | coding->require_flushing = 1; | 2489 | coding->require_flushing = 1; |
| 2448 | break; | 2490 | break; |
| @@ -2608,34 +2650,33 @@ detect_coding_mask (src, src_bytes) | |||
| 2608 | /* No valid ISO2022 code follows C. Try again. */ | 2650 | /* No valid ISO2022 code follows C. Try again. */ |
| 2609 | goto label_loop_detect_coding; | 2651 | goto label_loop_detect_coding; |
| 2610 | } | 2652 | } |
| 2611 | else if (c == ISO_CODE_SS2 || c == ISO_CODE_SS3) | ||
| 2612 | /* C is an ISO2022 specific control code of C1, | ||
| 2613 | or the first byte of SJIS's 2-byte character code, | ||
| 2614 | or a leading code of Emacs. */ | ||
| 2615 | mask = (detect_coding_iso2022 (src, src_end) | ||
| 2616 | | detect_coding_sjis (src, src_end) | ||
| 2617 | | detect_coding_emacs_mule (src, src_end) | ||
| 2618 | | CODING_CATEGORY_MASK_BINARY); | ||
| 2619 | |||
| 2620 | else if (c == ISO_CODE_CSI | ||
| 2621 | && (src < src_end | ||
| 2622 | && (*src == ']' | ||
| 2623 | || (src + 1 < src_end | ||
| 2624 | && src[1] == ']' | ||
| 2625 | && (*src == '0' || *src == '1' || *src == '2'))))) | ||
| 2626 | /* C is an ISO2022's control-sequence-introducer. */ | ||
| 2627 | mask = (detect_coding_iso2022 (src, src_end) | ||
| 2628 | | detect_coding_sjis (src, src_end) | ||
| 2629 | | detect_coding_emacs_mule (src, src_end) | ||
| 2630 | | CODING_CATEGORY_MASK_BINARY); | ||
| 2631 | |||
| 2632 | else if (c < 0xA0) | 2653 | else if (c < 0xA0) |
| 2633 | /* C is the first byte of SJIS character code, | 2654 | { |
| 2634 | or a leading-code of Emacs. */ | 2655 | /* If C is a special Microsoft code, |
| 2635 | mask = (detect_coding_sjis (src, src_end) | 2656 | or is an ISO2022 specific control code of C1 (SS2 or SS3), |
| 2636 | | detect_coding_emacs_mule (src, src_end) | 2657 | or is an ISO2022 control-sequence-introducer (CSI), |
| 2637 | | CODING_CATEGORY_MASK_BINARY); | 2658 | we should also consider the possibility of someof ISO2022 codings. */ |
| 2659 | if ((VECTORP (Vmicrosoft_code_table) | ||
| 2660 | && !NILP (XVECTOR (Vmicrosoft_code_table)->contents[c])) | ||
| 2661 | || (c == ISO_CODE_SS2 || c == ISO_CODE_SS3) | ||
| 2662 | || (c == ISO_CODE_CSI | ||
| 2663 | && (src < src_end | ||
| 2664 | && (*src == ']' | ||
| 2665 | || (src + 1 < src_end | ||
| 2666 | && src[1] == ']' | ||
| 2667 | && (*src == '0' || *src == '1' || *src == '2')))))) | ||
| 2668 | mask = (detect_coding_iso2022 (src, src_end) | ||
| 2669 | | detect_coding_sjis (src, src_end) | ||
| 2670 | | detect_coding_emacs_mule (src, src_end) | ||
| 2671 | | CODING_CATEGORY_MASK_BINARY); | ||
| 2638 | 2672 | ||
| 2673 | else | ||
| 2674 | /* C is the first byte of SJIS character code, or a | ||
| 2675 | leading-code of Emacs. */ | ||
| 2676 | mask = (detect_coding_sjis (src, src_end) | ||
| 2677 | | detect_coding_emacs_mule (src, src_end) | ||
| 2678 | | CODING_CATEGORY_MASK_BINARY); | ||
| 2679 | } | ||
| 2639 | else | 2680 | else |
| 2640 | /* C is a character of ISO2022 in graphic plane right, | 2681 | /* C is a character of ISO2022 in graphic plane right, |
| 2641 | or a SJIS's 1-byte character code (i.e. JISX0201), | 2682 | or a SJIS's 1-byte character code (i.e. JISX0201), |
| @@ -3547,6 +3588,18 @@ DEFUN ("set-terminal-coding-system-internal", | |||
| 3547 | return Qnil; | 3588 | return Qnil; |
| 3548 | } | 3589 | } |
| 3549 | 3590 | ||
| 3591 | DEFUN ("set-safe-terminal-coding-system-internal", | ||
| 3592 | Fset_safe_terminal_coding_system_internal, | ||
| 3593 | Sset_safe_terminal_coding_system_internal, 1, 1, 0, "") | ||
| 3594 | (coding_system) | ||
| 3595 | Lisp_Object coding_system; | ||
| 3596 | { | ||
| 3597 | CHECK_SYMBOL (coding_system, 0); | ||
| 3598 | setup_coding_system (Fcheck_coding_system (coding_system), | ||
| 3599 | &safe_terminal_coding); | ||
| 3600 | return Qnil; | ||
| 3601 | } | ||
| 3602 | |||
| 3550 | DEFUN ("terminal-coding-system", | 3603 | DEFUN ("terminal-coding-system", |
| 3551 | Fterminal_coding_system, Sterminal_coding_system, 0, 0, 0, | 3604 | Fterminal_coding_system, Sterminal_coding_system, 0, 0, 0, |
| 3552 | "Return coding-system of your terminal.") | 3605 | "Return coding-system of your terminal.") |
| @@ -3710,6 +3763,7 @@ init_coding_once () | |||
| 3710 | 3763 | ||
| 3711 | setup_coding_system (Qnil, &keyboard_coding); | 3764 | setup_coding_system (Qnil, &keyboard_coding); |
| 3712 | setup_coding_system (Qnil, &terminal_coding); | 3765 | setup_coding_system (Qnil, &terminal_coding); |
| 3766 | setup_coding_system (Qnil, &safe_terminal_coding); | ||
| 3713 | 3767 | ||
| 3714 | #if defined (MSDOS) || defined (WINDOWSNT) | 3768 | #if defined (MSDOS) || defined (WINDOWSNT) |
| 3715 | system_eol_type = CODING_EOL_CRLF; | 3769 | system_eol_type = CODING_EOL_CRLF; |
| @@ -3824,6 +3878,7 @@ syms_of_coding () | |||
| 3824 | defsubr (&Sdecode_big5_char); | 3878 | defsubr (&Sdecode_big5_char); |
| 3825 | defsubr (&Sencode_big5_char); | 3879 | defsubr (&Sencode_big5_char); |
| 3826 | defsubr (&Sset_terminal_coding_system_internal); | 3880 | defsubr (&Sset_terminal_coding_system_internal); |
| 3881 | defsubr (&Sset_safe_terminal_coding_system_internal); | ||
| 3827 | defsubr (&Sterminal_coding_system); | 3882 | defsubr (&Sterminal_coding_system); |
| 3828 | defsubr (&Sset_keyboard_coding_system_internal); | 3883 | defsubr (&Sset_keyboard_coding_system_internal); |
| 3829 | defsubr (&Skeyboard_coding_system); | 3884 | defsubr (&Skeyboard_coding_system); |
| @@ -3954,6 +4009,16 @@ designate it with the escape sequence identifing revision (cdr part of the eleme | |||
| 3954 | The car part is used for decoding a process output,\n\ | 4009 | The car part is used for decoding a process output,\n\ |
| 3955 | the cdr part is used for encoding a text to be sent to a process."); | 4010 | the cdr part is used for encoding a text to be sent to a process."); |
| 3956 | Vdefault_process_coding_system = Qnil; | 4011 | Vdefault_process_coding_system = Qnil; |
| 4012 | |||
| 4013 | DEFVAR_LISP ("special-microsoft-code-table", &Vmicrosoft_code_table, | ||
| 4014 | "Table of special Microsoft codes in the range 128..159 (inclusive).\n\ | ||
| 4015 | This is a vector of length 256.\n\ | ||
| 4016 | If Nth element is non-nil, the existence of code N in a file\n\ | ||
| 4017 | (or output of subprocess) doesn't prevent it to be detected as\n\ | ||
| 4018 | a coding system of ISO 2022 variant (e.g. iso-latin-1) on reading a file\n\ | ||
| 4019 | or reading output of a subprocess.\n\ | ||
| 4020 | Only 128th through 159th elements has a meaning."); | ||
| 4021 | Vmicrosoft_code_table = Fmake_vector (make_number (256), Qnil); | ||
| 3957 | } | 4022 | } |
| 3958 | 4023 | ||
| 3959 | #endif /* emacs */ | 4024 | #endif /* emacs */ |