]> code.delx.au - gnu-emacs/commitdiff
(Fcheck_coding_systems_region): Fix test for unibyte
authorAndreas Schwab <schwab@suse.de>
Mon, 16 Feb 2009 13:04:15 +0000 (13:04 +0000)
committerAndreas Schwab <schwab@suse.de>
Mon, 16 Feb 2009 13:04:15 +0000 (13:04 +0000)
string.

src/ChangeLog
src/coding.c

index 4a1b7f3fc190806314db2b0365f9bcf4588d0b04..3d86f4d105229a5fcb71d088783dda8b6b48b536 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-16  Andreas Schwab  <schwab@suse.de>
+
+       * coding.c (Fcheck_coding_systems_region): Fix test for unibyte
+       string.
+
 2009-02-16  Kenichi Handa  <handa@m17n.org>
 
        * coding.c (Fcheck_coding_systems_region): Fix typo; Qt -> Qnil.
index bd8c19f374a9d205fb2c17783ced813fb90de1c7..fff4d01d8909db2cfe23092a0e49ffe6449ba290 100644 (file)
@@ -8463,7 +8463,7 @@ START may be a string.  In that case, check if the string is
 encodable, and the value contains indices to the string instead of
 buffer positions.  END is ignored.
 
-If the current buffer (or START if it is string) is unibyte, the value
+If the current buffer (or START if it is string) is unibyte, the value
 is nil.  */)
      (start, end, coding_system_list)
      Lisp_Object start, end, coding_system_list;
@@ -8478,7 +8478,7 @@ is nil.  */)
   if (STRINGP (start))
     {
       if (!STRING_MULTIBYTE (start)
-         && SCHARS (start) != SBYTES (start))
+         || SCHARS (start) == SBYTES (start))
        return Qnil;
       start_byte = 0;
       end_byte = SBYTES (start);