From d366d2e41b62f50811e228426906c2efc01e40ca Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 15 Dec 1998 10:41:44 +0000 Subject: [PATCH] (printchar): Outputting multibyte characters to echo area always makes it multibyte. --- src/print.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/print.c b/src/print.c index 3723c79b6dd..9b24f989830 100644 --- a/src/print.c +++ b/src/print.c @@ -434,12 +434,18 @@ printchar (ch, fun) printbufidx--; } bcopy (tembuf, FRAME_MESSAGE_BUF (mini_frame), printbufidx); - message_enable_multibyte = 1; } + /* Record whether the message buffer is multibyte. + (If at any point some multibyte characters are added, then it is.) */ + if (len > 0 && ! NILP (current_buffer->enable_multibyte_characters)) + message_enable_multibyte = 1; + if (printbufidx < FRAME_MESSAGE_BUF_SIZE (mini_frame) - len) - bcopy (str, &FRAME_MESSAGE_BUF (mini_frame)[printbufidx], len), - printbufidx += len; + { + bcopy (str, &FRAME_MESSAGE_BUF (mini_frame)[printbufidx], len); + printbufidx += len; + } FRAME_MESSAGE_BUF (mini_frame)[printbufidx] = 0; echo_area_glyphs_length = printbufidx; -- 2.39.2