aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa2001-03-08 04:42:43 +0000
committerKenichi Handa2001-03-08 04:42:43 +0000
commitc210f766a0d65c17ddcaff933821ccc58f470e4d (patch)
treecd65781d1e27c735ccc0b25a79db9cee68816320 /src/coding.c
parent67091e5974ef1fedb18ee459c274d82878954d24 (diff)
downloademacs-c210f766a0d65c17ddcaff933821ccc58f470e4d.tar.gz
emacs-c210f766a0d65c17ddcaff933821ccc58f470e4d.zip
(Fdetect_coding_region): Fix comments added by the previous change.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/coding.c b/src/coding.c
index 72f773fb2e1..877d2f59ece 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -6229,13 +6229,16 @@ highest priority.")
6229 6229
6230 if (from < GPT && to >= GPT) 6230 if (from < GPT && to >= GPT)
6231 move_gap_both (to, to_byte); 6231 move_gap_both (to, to_byte);
6232 /* If we an anchor byte `\0' follows the region, we include it in
6233 the detecting source. Then code detectors can handle the tailing
6234 byte sequence more accurately.
6235
6236 Fix me: This is not an perfect solution. It is better that we
6237 add one more argument, say LAST_BLOCK, to all detect_coding_XXX.
6238 */
6232 if (to == Z || (to == GPT && GAP_SIZE > 0)) 6239 if (to == Z || (to == GPT && GAP_SIZE > 0))
6233 include_anchor_byte = 1; 6240 include_anchor_byte = 1;
6234 return detect_coding_system (BYTE_POS_ADDR (from_byte), 6241 return detect_coding_system (BYTE_POS_ADDR (from_byte),
6235 /* "+ include_anchor_byteq" is to
6236 include the anchor byte `\0'. With
6237 this, code detectors can check if
6238 tailing bytes are valid. */
6239 to_byte - from_byte + include_anchor_byte, 6242 to_byte - from_byte + include_anchor_byte,
6240 !NILP (highest), 6243 !NILP (highest),
6241 !NILP (current_buffer 6244 !NILP (current_buffer
@@ -6261,8 +6264,8 @@ highest priority.")
6261 return detect_coding_system (XSTRING (string)->data, 6264 return detect_coding_system (XSTRING (string)->data,
6262 /* "+ 1" is to include the anchor byte 6265 /* "+ 1" is to include the anchor byte
6263 `\0'. With this, code detectors can 6266 `\0'. With this, code detectors can
6264 check if tailing bytes are 6267 handle the tailing bytes more
6265 valid. */ 6268 accurately. */
6266 STRING_BYTES (XSTRING (string)) + 1, 6269 STRING_BYTES (XSTRING (string)) + 1,
6267 !NILP (highest), 6270 !NILP (highest),
6268 STRING_MULTIBYTE (string)); 6271 STRING_MULTIBYTE (string));