aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-04 03:01:57 +0000
committerRichard M. Stallman1997-08-04 03:01:57 +0000
commit10bff6f19d89d52c3b121915b9234fef81655e02 (patch)
treefb319a4cebff373e5c4f674927d376e82603268d /src/coding.c
parent14a136b327ea31b249f2528137632696e7779882 (diff)
downloademacs-10bff6f19d89d52c3b121915b9234fef81655e02.tar.gz
emacs-10bff6f19d89d52c3b121915b9234fef81655e02.zip
(detect_coding_mask): Include CODING_CATEGORY_MASK_BINARY in the
return value if any 8-bit code is found. Doc fix.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/coding.c b/src/coding.c
index 18c641bcc40..5bfcacc1e17 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -521,7 +521,7 @@ detect_coding_emacs_mule (src, src_end)
521 function control char escape sequence description 521 function control char escape sequence description
522 ---------------------------------------------------------------------- 522 ----------------------------------------------------------------------
523 SI (shift-in) 0x0F none invoke G0 to GL 523 SI (shift-in) 0x0F none invoke G0 to GL
524 SI (shift-out) 0x0E none invoke G1 to GL 524 SO (shift-out) 0x0E none invoke G1 to GL
525 LS2 (locking-shift-2) none ESC 'n' invoke G2 into GL 525 LS2 (locking-shift-2) none ESC 'n' invoke G2 into GL
526 LS3 (locking-shift-3) none ESC 'o' invoke G3 into GL 526 LS3 (locking-shift-3) none ESC 'o' invoke G3 into GL
527 SS2 (single-shift-2) 0x8E ESC 'N' invoke G2 into GL 527 SS2 (single-shift-2) 0x8E ESC 'N' invoke G2 into GL
@@ -2593,7 +2593,8 @@ detect_coding_mask (src, src_bytes)
2593 or a leading code of Emacs. */ 2593 or a leading code of Emacs. */
2594 mask = (detect_coding_iso2022 (src, src_end) 2594 mask = (detect_coding_iso2022 (src, src_end)
2595 | detect_coding_sjis (src, src_end) 2595 | detect_coding_sjis (src, src_end)
2596 | detect_coding_emacs_mule (src, src_end)); 2596 | detect_coding_emacs_mule (src, src_end)
2597 | CODING_CATEGORY_MASK_BINARY);
2597 2598
2598 else if (c == ISO_CODE_CSI 2599 else if (c == ISO_CODE_CSI
2599 && (src < src_end 2600 && (src < src_end
@@ -2604,13 +2605,15 @@ detect_coding_mask (src, src_bytes)
2604 /* C is an ISO2022's control-sequence-introducer. */ 2605 /* C is an ISO2022's control-sequence-introducer. */
2605 mask = (detect_coding_iso2022 (src, src_end) 2606 mask = (detect_coding_iso2022 (src, src_end)
2606 | detect_coding_sjis (src, src_end) 2607 | detect_coding_sjis (src, src_end)
2607 | detect_coding_emacs_mule (src, src_end)); 2608 | detect_coding_emacs_mule (src, src_end)
2609 | CODING_CATEGORY_MASK_BINARY);
2608 2610
2609 else if (c < 0xA0) 2611 else if (c < 0xA0)
2610 /* C is the first byte of SJIS character code, 2612 /* C is the first byte of SJIS character code,
2611 or a leading-code of Emacs. */ 2613 or a leading-code of Emacs. */
2612 mask = (detect_coding_sjis (src, src_end) 2614 mask = (detect_coding_sjis (src, src_end)
2613 | detect_coding_emacs_mule (src, src_end)); 2615 | detect_coding_emacs_mule (src, src_end)
2616 | CODING_CATEGORY_MASK_BINARY);
2614 2617
2615 else 2618 else
2616 /* C is a character of ISO2022 in graphic plane right, 2619 /* C is a character of ISO2022 in graphic plane right,
@@ -2618,7 +2621,8 @@ detect_coding_mask (src, src_bytes)
2618 or the first byte of BIG5's 2-byte code. */ 2621 or the first byte of BIG5's 2-byte code. */
2619 mask = (detect_coding_iso2022 (src, src_end) 2622 mask = (detect_coding_iso2022 (src, src_end)
2620 | detect_coding_sjis (src, src_end) 2623 | detect_coding_sjis (src, src_end)
2621 | detect_coding_big5 (src, src_end)); 2624 | detect_coding_big5 (src, src_end)
2625 | CODING_CATEGORY_MASK_BINARY);
2622 2626
2623 return mask; 2627 return mask;
2624} 2628}
@@ -3801,18 +3805,20 @@ syms_of_coding ()
3801 } 3805 }
3802 3806
3803 DEFVAR_LISP ("coding-system-for-read", &Vcoding_system_for_read, 3807 DEFVAR_LISP ("coding-system-for-read", &Vcoding_system_for_read,
3804 "A variable of internal use only.\n\ 3808 "Specify the coding system for read operations.\n\
3809It is useful to bind this variable with `let', but do not set it globally.
3805If the value is a coding system, it is used for decoding on read operation.\n\ 3810If the value is a coding system, it is used for decoding on read operation.\n\
3806If not, an appropriate element is used from one of the coding system alists:\n\ 3811If not, an appropriate element is used from one of the coding system alists:\n\
3807There are three of such tables, `file-coding-system-alist',\n\ 3812There are three such tables, `file-coding-system-alist',\n\
3808`process-coding-system-alist', and `network-coding-system-alist'."); 3813`process-coding-system-alist', and `network-coding-system-alist'.");
3809 Vcoding_system_for_read = Qnil; 3814 Vcoding_system_for_read = Qnil;
3810 3815
3811 DEFVAR_LISP ("coding-system-for-write", &Vcoding_system_for_write, 3816 DEFVAR_LISP ("coding-system-for-write", &Vcoding_system_for_write,
3812 "A variable of internal use only.\n\ 3817 "Specify the coding system for write operations.\n\
3818It is useful to bind this variable with `let', but do not set it globally.
3813If the value is a coding system, it is used for encoding on write operation.\n\ 3819If the value is a coding system, it is used for encoding on write operation.\n\
3814If not, an appropriate element is used from one of the coding system alists:\n\ 3820If not, an appropriate element is used from one of the coding system alists:\n\
3815There are three of such tables, `file-coding-system-alist',\n\ 3821There are three such tables, `file-coding-system-alist',\n\
3816`process-coding-system-alist', and `network-coding-system-alist'."); 3822`process-coding-system-alist', and `network-coding-system-alist'.");
3817 Vcoding_system_for_write = Qnil; 3823 Vcoding_system_for_write = Qnil;
3818 3824