changeset 23898:4d31ceed9039

(printchar): Outputting multibyte characters to echo area always makes it multibyte.
author Kenichi Handa <handa@m17n.org>
date Tue, 15 Dec 1998 10:41:44 +0000
parents 6a13232828e5
children 5aca264ca763
files src/print.c
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/print.c	Tue Dec 15 10:38:40 1998 +0000
+++ b/src/print.c	Tue Dec 15 10:41:44 1998 +0000
@@ -434,12 +434,18 @@
 		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;