changeset 36650:a1859dfb6a1b

(Fdetect_coding_region): Fix comments added by the previous change.
author Kenichi Handa <handa@m17n.org>
date Thu, 08 Mar 2001 04:42:43 +0000
parents 5dc88f9ab0ef
children f16f21a469b1
files src/coding.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Thu Mar 08 02:19:18 2001 +0000
+++ b/src/coding.c	Thu Mar 08 04:42:43 2001 +0000
@@ -6229,13 +6229,16 @@
 
   if (from < GPT && to >= GPT)
     move_gap_both (to, to_byte);
+  /* If we an anchor byte `\0' follows the region, we include it in
+     the detecting source.  Then code detectors can handle the tailing
+     byte sequence more accurately.
+
+     Fix me: This is not an perfect solution.  It is better that we
+     add one more argument, say LAST_BLOCK, to all detect_coding_XXX.
+  */
   if (to == Z || (to == GPT && GAP_SIZE > 0))
     include_anchor_byte = 1;
   return detect_coding_system (BYTE_POS_ADDR (from_byte),
-			       /* "+ include_anchor_byteq" is to
-				  include the anchor byte `\0'.  With
-				  this, code detectors can check if
-				  tailing bytes are valid.  */
 			       to_byte - from_byte + include_anchor_byte,
 			       !NILP (highest),
 			       !NILP (current_buffer
@@ -6261,8 +6264,8 @@
   return detect_coding_system (XSTRING (string)->data,
 			       /* "+ 1" is to include the anchor byte
 				  `\0'.  With this, code detectors can
-				  check if tailing bytes are
-				  valid.  */
+				  handle the tailing bytes more
+				  accurately.  */
 			       STRING_BYTES (XSTRING (string)) + 1,
 			       !NILP (highest),
 			       STRING_MULTIBYTE (string));