From dcfb9bc4a1082ae52ee211dc7050545818c77b38 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 2 Mar 2010 10:30:52 +0900 Subject: [PATCH] buffer.c (Fset_buffer_multibyte): Fix handling of the multibyte form of raw-bytes. --- src/ChangeLog | 5 +++++ src/buffer.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f0a620b7b99..cb9b2d85d11 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-03-02 Kenichi Handa + + * buffer.c (Fset_buffer_multibyte): Fix handling of the multibyte + form of raw-bytes. + 2010-02-28 Chong Yidong * charset.c (load_charset_map_from_file) diff --git a/src/buffer.c b/src/buffer.c index 1880581c0a1..a0acad309af 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2497,7 +2497,9 @@ current buffer is cleared. */) 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 { -- 2.39.2