From: Paul Eggert Date: Tue, 18 Aug 2015 23:24:27 +0000 (-0700) Subject: Fix multibyte confusion in diagnostics X-Git-Tag: emacs-25.0.90~1355 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aab8326b28f460a47f0a073612a8c8f9e9d8ec2f;p=emacs.git Fix multibyte confusion in diagnostics * src/print.c (print_error_message): Don't assume that the caller's name is unibyte. * src/xdisp.c (vadd_to_log): Don't assume that the formatted diagnostic is unibyte. --- diff --git a/src/print.c b/src/print.c index f396151eaa1..af615749f37 100644 --- a/src/print.c +++ b/src/print.c @@ -902,7 +902,7 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context, USE_SAFE_ALLOCA; char *name = SAFE_ALLOCA (cnamelen); memcpy (name, SDATA (cname), cnamelen); - message_dolog (name, cnamelen, 0, 0); + message_dolog (name, cnamelen, 0, STRING_MULTIBYTE (cname)); message_dolog (": ", 2, 0, 0); SAFE_FREE (); } diff --git a/src/xdisp.c b/src/xdisp.c index 6d747ebc5ce..88e6c8d1613 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9843,7 +9843,7 @@ vadd_to_log (char const *format, va_list ap) char *buffer = SAFE_ALLOCA (len); memcpy (buffer, SDATA (msg), len); - message_dolog (buffer, len - 1, true, false); + message_dolog (buffer, len - 1, true, STRING_MULTIBYTE (msg)); SAFE_FREE (); UNGCPRO;