aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c23
1 files changed, 14 insertions, 9 deletions
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)
6063 cmd_error, so this must be just an informative message; toss it. */ 6063 cmd_error, so this must be just an informative message; toss it. */
6064 if (FRAME_MESSAGE_BUF (f)) 6064 if (FRAME_MESSAGE_BUF (f))
6065 { 6065 {
6066 int len; 6066 Lisp_Object args[2], message;
6067 char *a[1]; 6067 struct gcpro gcpro1, gcpro2;
6068 a[0] = (char *) XSTRING (string)->data;
6069 6068
6070 len = doprnt (FRAME_MESSAGE_BUF (f), 6069 args[0] = build_string (m);
6071 FRAME_MESSAGE_BUF_SIZE (f), m, (char *)0, 3, a); 6070 args[1] = message = string;
6071 GCPRO2 (args, message);
6072 gcpro1.nvars = 2;
6073
6074 message = Fformat (2, args);
6072 6075
6073 if (log) 6076 if (log)
6074 message2 (FRAME_MESSAGE_BUF (f), len, 6077 message3 (message, STRING_BYTES (XSTRING (message)),
6075 STRING_MULTIBYTE (string)); 6078 STRING_MULTIBYTE (message));
6076 else 6079 else
6077 message2_nolog (FRAME_MESSAGE_BUF (f), len, 6080 message3_nolog (message, STRING_BYTES (XSTRING (message)),
6078 STRING_MULTIBYTE (string)); 6081 STRING_MULTIBYTE (message));
6082
6083 UNGCPRO;
6079 6084
6080 /* Print should start at the beginning of the message 6085 /* Print should start at the beginning of the message
6081 buffer next time. */ 6086 buffer next time. */