From: Richard M. Stallman Date: Sat, 9 May 1998 21:47:17 +0000 (+0000) Subject: (detect_coding_mask): Check also coding-category-binary. X-Git-Tag: emacs-20.3~1068 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5ab13dd02e70b1f8092b8ed82b59e5d477882fe7;p=emacs.git (detect_coding_mask): Check also coding-category-binary. --- diff --git a/src/coding.c b/src/coding.c index fff9292a850..a293d15988a 100644 --- a/src/coding.c +++ b/src/coding.c @@ -3256,15 +3256,18 @@ detect_coding_mask (source, src_bytes, priorities, skip) { for (i = 0; i < CODING_CATEGORY_IDX_MAX; i++) { - priorities[i] &= try; - if (priorities[i] & CODING_CATEGORY_MASK_ISO) + if (priorities[i] & try & CODING_CATEGORY_MASK_ISO) mask = detect_coding_iso2022 (src, src_end); - else if (priorities[i] & CODING_CATEGORY_MASK_SJIS) + else if (priorities[i] & try & CODING_CATEGORY_MASK_SJIS) mask = detect_coding_sjis (src, src_end); - else if (priorities[i] & CODING_CATEGORY_MASK_BIG5) + else if (priorities[i] & try & CODING_CATEGORY_MASK_BIG5) mask = detect_coding_big5 (src, src_end); - else if (priorities[i] & CODING_CATEGORY_MASK_EMACS_MULE) + else if (priorities[i] & try & CODING_CATEGORY_MASK_EMACS_MULE) mask = detect_coding_emacs_mule (src, src_end); + else if (priorities[i] & CODING_CATEGORY_MASK_RAW_TEXT) + mask = CODING_CATEGORY_MASK_RAW_TEXT; + else if (priorities[i] & CODING_CATEGORY_MASK_BINARY) + mask = CODING_CATEGORY_MASK_BINARY; if (mask) goto label_return_highest_only; } @@ -3279,7 +3282,7 @@ detect_coding_mask (source, src_bytes, priorities, skip) if (try & CODING_CATEGORY_MASK_EMACS_MULE) mask |= detect_coding_emacs_mule (src, src_end); } - return (mask | CODING_CATEGORY_MASK_RAW_TEXT); + return (mask | CODING_CATEGORY_MASK_RAW_TEXT | CODING_CATEGORY_MASK_BINARY); label_return_highest_only: for (i = 0; i < CODING_CATEGORY_IDX_MAX; i++)