Mercurial > emacs
comparison src/xdisp.c @ 1873:c5038f47c602
* xdisp.c (message): Set echo_frame to the frame whose message buf
we want to use, not to the message buf itself.
* xdisp.c (message): Use the message buffer of the frame we're
going to display the message on to format the message, not that of
the selected frame.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sun, 14 Feb 1993 14:39:45 +0000 |
parents | 19755499df90 |
children | 37c45885540a |
comparison
equal
deleted
inserted
replaced
1872:ad692b76edf4 | 1873:c5038f47c602 |
---|---|
231 fprintf (stderr, m, a1, a2, a3); | 231 fprintf (stderr, m, a1, a2, a3); |
232 fprintf (stderr, "\n"); | 232 fprintf (stderr, "\n"); |
233 fflush (stderr); | 233 fflush (stderr); |
234 } | 234 } |
235 } | 235 } |
236 /* A null message buffer means that the frame hasn't really been | 236 else if (INTERACTIVE) |
237 initialized yet. Error messages get reported properly by | 237 { |
238 cmd_error, so this must be just an informative message; toss it. */ | 238 /* The frame whose minibuffer we're going to display the message on. |
239 else if (INTERACTIVE && FRAME_MESSAGE_BUF (selected_frame)) | 239 It may be larger than the selected frame, so we need |
240 { | 240 to use its buffer, not the selected frame's buffer. */ |
241 if (m) | 241 FRAME_PTR echo_frame; |
242 { | 242 #ifdef MULTI_FRAME |
243 { | 243 choose_minibuf_frame (); |
244 echo_frame = XFRAME (WINDOW_FRAME (XWINDOW (minibuf_window))); | |
245 #else | |
246 echo_frame = selected_frame; | |
247 #endif | |
248 | |
249 /* A null message buffer means that the frame hasn't really been | |
250 initialized yet. Error messages get reported properly by | |
251 cmd_error, so this must be just an informative message; toss it. */ | |
252 if (FRAME_MESSAGE_BUF (echo_frame)) | |
253 { | |
254 if (m) | |
255 { | |
256 { | |
244 #ifdef NO_ARG_ARRAY | 257 #ifdef NO_ARG_ARRAY |
245 int a[3]; | 258 int a[3]; |
246 a[0] = a1; | 259 a[0] = a1; |
247 a[1] = a2; | 260 a[1] = a2; |
248 a[2] = a3; | 261 a[2] = a3; |
249 | 262 |
250 doprnt (FRAME_MESSAGE_BUF (selected_frame), | 263 doprnt (FRAME_MESSAGE_BUF (echo_frame), |
251 FRAME_WIDTH (selected_frame), m, 0, 3, a); | 264 FRAME_WIDTH (echo_frame), m, 0, 3, a); |
252 #else | 265 #else |
253 doprnt (FRAME_MESSAGE_BUF (selected_frame), | 266 doprnt (FRAME_MESSAGE_BUF (echo_frame), |
254 FRAME_WIDTH (selected_frame), m, 0, 3, &a1); | 267 FRAME_WIDTH (echo_frame), m, 0, 3, &a1); |
255 #endif /* NO_ARG_ARRAY */ | 268 #endif /* NO_ARG_ARRAY */ |
256 } | 269 } |
257 | 270 |
258 message1 (FRAME_MESSAGE_BUF (selected_frame)); | 271 message1 (FRAME_MESSAGE_BUF (echo_frame)); |
259 } | 272 } |
260 else | 273 else |
261 message1 (0); | 274 message1 (0); |
262 | 275 |
263 /* Print should start at the beginning of the message | 276 /* Print should start at the beginning of the message |
264 buffer next time. */ | 277 buffer next time. */ |
265 message_buf_print = 0; | 278 message_buf_print = 0; |
279 } | |
266 } | 280 } |
267 } | 281 } |
268 | 282 |
269 static void | 283 static void |
270 echo_area_display () | 284 echo_area_display () |