aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-12-15 10:38:40 +0000
committerKenichi Handa1998-12-15 10:38:40 +0000
commitc7e3eb8b1b0209954131eccddba483cdd95ee824 (patch)
tree28e6894043d6272b22fd6fa2d2c2fbadf24f58b0 /src
parente62e3e6b5e68bb41e9783c1afad859af6fe816d8 (diff)
downloademacs-c7e3eb8b1b0209954131eccddba483cdd95ee824.tar.gz
emacs-c7e3eb8b1b0209954131eccddba483cdd95ee824.zip
(printchar): Cancel previous change.
Diffstat (limited to 'src')
-rw-r--r--src/print.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/print.c b/src/print.c
index b8be2771944..3723c79b6dd 100644
--- a/src/print.c
+++ b/src/print.c
@@ -417,29 +417,23 @@ printchar (ch, fun)
417 417
418 /* Convert message to multibyte if we are now adding multibyte text. */ 418 /* Convert message to multibyte if we are now adding multibyte text. */
419 if (! NILP (current_buffer->enable_multibyte_characters) 419 if (! NILP (current_buffer->enable_multibyte_characters)
420 && len > 1 420 && ! message_enable_multibyte
421 && ! message_enable_multibyte) 421 && printbufidx > 0)
422 { 422 {
423 /* If we have already had some message text in the messsage 423 int size = count_size_as_multibyte (FRAME_MESSAGE_BUF (mini_frame),
424 buffer, we must convert it to multibyte. */ 424 printbufidx);
425 if (printbufidx > 0) 425 unsigned char *tembuf = (unsigned char *) alloca (size + 1);
426 copy_text (FRAME_MESSAGE_BUF (mini_frame), tembuf, printbufidx,
427 0, 1);
428 printbufidx = size;
429 if (printbufidx > FRAME_MESSAGE_BUF_SIZE (mini_frame))
426 { 430 {
427 int size 431 printbufidx = FRAME_MESSAGE_BUF_SIZE (mini_frame);
428 = count_size_as_multibyte (FRAME_MESSAGE_BUF (mini_frame), 432 /* Rewind incomplete multi-byte form. */
429 printbufidx); 433 while (printbufidx > 0 && tembuf[printbufidx] >= 0xA0)
430 unsigned char *tembuf = (unsigned char *) alloca (size + 1); 434 printbufidx--;
431 copy_text (FRAME_MESSAGE_BUF (mini_frame), tembuf, printbufidx,
432 0, 1);
433 printbufidx = size;
434 if (printbufidx > FRAME_MESSAGE_BUF_SIZE (mini_frame))
435 {
436 printbufidx = FRAME_MESSAGE_BUF_SIZE (mini_frame);
437 /* Rewind incomplete multi-byte form. */
438 while (printbufidx > 0 && tembuf[printbufidx] >= 0xA0)
439 printbufidx--;
440 }
441 bcopy (tembuf, FRAME_MESSAGE_BUF (mini_frame), printbufidx);
442 } 435 }
436 bcopy (tembuf, FRAME_MESSAGE_BUF (mini_frame), printbufidx);
443 message_enable_multibyte = 1; 437 message_enable_multibyte = 1;
444 } 438 }
445 439