From: Gerd Moellmann Date: Wed, 6 Mar 2002 14:03:07 +0000 (+0000) Subject: (message_with_string): Use Fformat instead of doprnt and X-Git-Tag: ttn-vms-21-2-B4~16307 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eb48413275b7bf6f07772c8e3af476a34ad1cc64;p=emacs.git (message_with_string): Use Fformat instead of doprnt and message3 instead of message2 to display the message using STRING's text properties. --- diff --git a/src/xdisp.c b/src/xdisp.c index b649cb2f04f..86ff2c5e2cf 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -6063,19 +6063,24 @@ message_with_string (m, string, log) cmd_error, so this must be just an informative message; toss it. */ if (FRAME_MESSAGE_BUF (f)) { - int len; - char *a[1]; - a[0] = (char *) XSTRING (string)->data; + Lisp_Object args[2], message; + struct gcpro gcpro1, gcpro2; - len = doprnt (FRAME_MESSAGE_BUF (f), - FRAME_MESSAGE_BUF_SIZE (f), m, (char *)0, 3, a); + args[0] = build_string (m); + args[1] = message = string; + GCPRO2 (args, message); + gcpro1.nvars = 2; + + message = Fformat (2, args); if (log) - message2 (FRAME_MESSAGE_BUF (f), len, - STRING_MULTIBYTE (string)); + message3 (message, STRING_BYTES (XSTRING (message)), + STRING_MULTIBYTE (message)); else - message2_nolog (FRAME_MESSAGE_BUF (f), len, - STRING_MULTIBYTE (string)); + message3_nolog (message, STRING_BYTES (XSTRING (message)), + STRING_MULTIBYTE (message)); + + UNGCPRO; /* Print should start at the beginning of the message buffer next time. */