comparison src/xdisp.c @ 99178:8af0a96bf7da

* xdisp.c (pos_visible_p, redisplay_internal, message3_nolog) (message2_nolog): Check FRAME_INITIAL_P instead of noninteractively. * emacs.c (is_daemon): Remove. (main): Don't set is_daemon. (IS_DAEMON): New macro. (Fdaemonp, Fdaemon_initialized): Use it. (Fdaemon_initialized): Wrtie a char into the pipe to make sure the parent exits. (syms_of_emacs): Explicitly initialize daemon_pipe[1].
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 28 Oct 2008 01:02:44 +0000
parents 299572dfe42e
children 9ddf901895dd
comparison
equal deleted inserted replaced
99177:a70ba38c4731 99178:8af0a96bf7da
1321 struct it it; 1321 struct it it;
1322 struct text_pos top; 1322 struct text_pos top;
1323 int visible_p = 0; 1323 int visible_p = 0;
1324 struct buffer *old_buffer = NULL; 1324 struct buffer *old_buffer = NULL;
1325 1325
1326 if (noninteractive) 1326 if (FRAME_INITIAL_P (XFRAME (WINDOW_FRAME (w))))
1327 return visible_p; 1327 return visible_p;
1328 1328
1329 if (XBUFFER (w->buffer) != current_buffer) 1329 if (XBUFFER (w->buffer) != current_buffer)
1330 { 1330 {
1331 old_buffer = current_buffer; 1331 old_buffer = current_buffer;
7889 int nbytes, multibyte; 7889 int nbytes, multibyte;
7890 { 7890 {
7891 struct frame *sf = SELECTED_FRAME (); 7891 struct frame *sf = SELECTED_FRAME ();
7892 message_enable_multibyte = multibyte; 7892 message_enable_multibyte = multibyte;
7893 7893
7894 if (noninteractive) 7894 if (FRAME_INITIAL_P (sf))
7895 { 7895 {
7896 if (noninteractive_need_newline) 7896 if (noninteractive_need_newline)
7897 putc ('\n', stderr); 7897 putc ('\n', stderr);
7898 noninteractive_need_newline = 0; 7898 noninteractive_need_newline = 0;
7899 if (m) 7899 if (m)
7988 int nbytes, multibyte; 7988 int nbytes, multibyte;
7989 { 7989 {
7990 struct frame *sf = SELECTED_FRAME (); 7990 struct frame *sf = SELECTED_FRAME ();
7991 message_enable_multibyte = multibyte; 7991 message_enable_multibyte = multibyte;
7992 7992
7993 if (noninteractive) 7993 if (FRAME_INITIAL_P (sf))
7994 { 7994 {
7995 if (noninteractive_need_newline) 7995 if (noninteractive_need_newline)
7996 putc ('\n', stderr); 7996 putc ('\n', stderr);
7997 noninteractive_need_newline = 0; 7997 noninteractive_need_newline = 0;
7998 if (STRINGP (m)) 7998 if (STRINGP (m))
8086 { 8086 {
8087 if (noninteractive_need_newline) 8087 if (noninteractive_need_newline)
8088 putc ('\n', stderr); 8088 putc ('\n', stderr);
8089 noninteractive_need_newline = 0; 8089 noninteractive_need_newline = 0;
8090 fprintf (stderr, m, SDATA (string)); 8090 fprintf (stderr, m, SDATA (string));
8091 if (cursor_in_echo_area == 0) 8091 if (!cursor_in_echo_area)
8092 fprintf (stderr, "\n"); 8092 fprintf (stderr, "\n");
8093 fflush (stderr); 8093 fflush (stderr);
8094 } 8094 }
8095 } 8095 }
8096 else if (INTERACTIVE) 8096 else if (INTERACTIVE)
11298 TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p)); 11298 TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p));
11299 11299
11300 /* No redisplay if running in batch mode or frame is not yet fully 11300 /* No redisplay if running in batch mode or frame is not yet fully
11301 initialized, or redisplay is explicitly turned off by setting 11301 initialized, or redisplay is explicitly turned off by setting
11302 Vinhibit_redisplay. */ 11302 Vinhibit_redisplay. */
11303 if (noninteractive 11303 if (FRAME_INITIAL_P (SELECTED_FRAME ())
11304 || !NILP (Vinhibit_redisplay)) 11304 || !NILP (Vinhibit_redisplay))
11305 return; 11305 return;
11306 11306
11307 /* Don't examine these until after testing Vinhibit_redisplay. 11307 /* Don't examine these until after testing Vinhibit_redisplay.
11308 When Emacs is shutting down, perhaps because its connection to 11308 When Emacs is shutting down, perhaps because its connection to