diff options
| author | Gerd Moellmann | 2002-03-06 14:03:07 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2002-03-06 14:03:07 +0000 |
| commit | eb48413275b7bf6f07772c8e3af476a34ad1cc64 (patch) | |
| tree | 6ae28f6c25fbb8365518e023c946617081f12c29 | |
| parent | a10cd561953281246c7b7904a55e042ae901d77b (diff) | |
| download | emacs-eb48413275b7bf6f07772c8e3af476a34ad1cc64.tar.gz emacs-eb48413275b7bf6f07772c8e3af476a34ad1cc64.zip | |
(message_with_string): Use Fformat instead of doprnt and
message3 instead of message2 to display the message using STRING's
text properties.
| -rw-r--r-- | src/xdisp.c | 23 |
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. */ |