*** generic/tkMain.c.orig	Wed Apr 28 20:18:06 1999
--- generic/tkMain.c	Sun Jan 16 17:43:04 2000
***************
*** 57,64 ****
  extern int		isatty _ANSI_ARGS_((int fd));
  extern char *		strrchr _ANSI_ARGS_((CONST char *string, int c));
  #endif
! extern void		TkpDisplayWarning _ANSI_ARGS_((char *msg,
! 			    char *title));
  
  /*
   * Forward declarations for procedures defined later in this file.
--- 57,64 ----
  extern int		isatty _ANSI_ARGS_((int fd));
  extern char *		strrchr _ANSI_ARGS_((CONST char *string, int c));
  #endif
! extern void		TkpDisplayWarning _ANSI_ARGS_((CONST char *msg,
! 			    CONST char *title));
  
  /*
   * Forward declarations for procedures defined later in this file.
***************
*** 407,412 ****
--- 407,413 ----
  	partial ? "tcl_prompt2" : "tcl_prompt1", TCL_GLOBAL_ONLY);
      if (promptCmd == NULL) {
  defaultPrompt:
+ 	outChannel = Tcl_GetChannel(interp, "stdout", NULL);
  	if (!partial) {
  
              /*
***************
*** 415,427 ****
               * this interpreter with "interp transfer".
               */
  
- 	    outChannel = Tcl_GetChannel(interp, "stdout", NULL);
              if (outChannel != (Tcl_Channel) NULL) {
                  Tcl_WriteChars(outChannel, "% ", 2);
              }
  	}
      } else {
  	code = Tcl_Eval(interp, promptCmd);
  	if (code != TCL_OK) {
  	    Tcl_AddErrorInfo(interp,
  		    "\n    (script that generates prompt)");
--- 416,428 ----
               * this interpreter with "interp transfer".
               */
  
              if (outChannel != (Tcl_Channel) NULL) {
                  Tcl_WriteChars(outChannel, "% ", 2);
              }
  	}
      } else {
  	code = Tcl_Eval(interp, promptCmd);
+ 	outChannel = Tcl_GetChannel(interp, "stdout", NULL);
  	if (code != TCL_OK) {
  	    Tcl_AddErrorInfo(interp,
  		    "\n    (script that generates prompt)");
***************
*** 437,442 ****
--- 438,445 ----
                  Tcl_WriteChars(errChannel, "\n", 1);
              }
  	    goto defaultPrompt;
+ 	} else if (*Tcl_GetStringResult(interp) && outChannel) {
+ 	    Tcl_Write(outChannel, Tcl_GetStringResult(interp), -1);
  	}
      }
      outChannel = Tcl_GetChannel(interp, "stdout", NULL);
