changeset 107311:cdeadbfdda61

buffer.c (Fset_buffer_multibyte): Fix handling of the multibyte form of raw-bytes.
author Kenichi Handa <handa@m17n.org>
date Tue, 02 Mar 2010 10:30:52 +0900
parents e2efddfebd89
children 3050113d9ebb
files src/ChangeLog src/buffer.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Mar 01 20:50:57 2010 +0900
+++ b/src/ChangeLog	Tue Mar 02 10:30:52 2010 +0900
@@ -1,3 +1,8 @@
+2010-03-02  Kenichi Handa  <handa@m17n.org>
+
+	* buffer.c (Fset_buffer_multibyte): Fix handling of the multibyte
+	form of raw-bytes.
+
 2010-02-28  Chong Yidong  <cyd@stupidchicken.com>
 
 	* charset.c (load_charset_map_from_file)
--- a/src/buffer.c	Mon Mar 01 20:50:57 2010 +0900
+++ b/src/buffer.c	Tue Mar 02 10:30:52 2010 +0900
@@ -2497,7 +2497,9 @@
 
 	  if (ASCII_BYTE_P (*p))
 	    p++, pos++;
-	  else if (EQ (flag, Qt) && (bytes = MULTIBYTE_LENGTH (p, pend)) > 0)
+	  else if (EQ (flag, Qt)
+		   && ! CHAR_BYTE8_HEAD_P (*p)
+		   && (bytes = MULTIBYTE_LENGTH (p, pend)) > 0)
 	    p += bytes, pos += bytes;
 	  else
 	    {