Mercurial > emacs
changeset 43745:e959a4317633
(message_with_string): Use Fformat instead of doprnt and
message3 instead of message2 to display the message using STRING's
text properties.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 06 Mar 2002 14:03:07 +0000 |
parents | 5c8c45f534eb |
children | e9ccd91206bd |
files | src/xdisp.c |
diffstat | 1 files changed, 15 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Wed Mar 06 13:51:28 2002 +0000 +++ b/src/xdisp.c Wed Mar 06 14:03:07 2002 +0000 @@ -6063,19 +6063,24 @@ 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; - - len = doprnt (FRAME_MESSAGE_BUF (f), - FRAME_MESSAGE_BUF_SIZE (f), m, (char *)0, 3, a); + Lisp_Object args[2], message; + struct gcpro gcpro1, gcpro2; + + 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. */