From 5d7e8345557656c240b0305366d51f1b8e4bcc40 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 11 Aug 1997 21:44:08 +0000 Subject: [PATCH] (init_environment): Set Emacs root directory properly when the executable is in its `src' subdirectory, as under a debugger. (IT_set_face): If termscript is in use, print the number of the face as well. --- src/msdos.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/msdos.c b/src/msdos.c index bed172fa03e..a35e1bce552 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -591,7 +591,8 @@ IT_set_face (int face) else fp = intern_face (selected_frame, FRAME_COMPUTED_FACES (foo)[face]); if (termscript) - fprintf (termscript, "", FACE_FOREGROUND (fp), FACE_BACKGROUND (fp)); + fprintf (termscript, "", + face, FACE_FOREGROUND (fp), FACE_BACKGROUND (fp)); screen_face = face; ScreenAttrib = (FACE_BACKGROUND (fp) << 4) | FACE_FOREGROUND (fp); } @@ -2708,10 +2709,12 @@ init_environment (argc, argv, skip_args) while (len > 0 && root[len] != '/' && root[len] != ':') len--; root[len] = '\0'; - if (len > 4 && strcmp (root + len - 4, "/bin") == 0) + if (len > 4 + && (strcmp (root + len - 4, "/bin") == 0 + || strcmp (root + len - 4, "/src") == 0)) /* under a debugger */ root[len - 4] = '\0'; else - strcpy (root, "c:/emacs"); /* Only under debuggers, I think. */ + strcpy (root, "c:/emacs"); /* let's be defensive */ len = strlen (root); strcpy (emacsroot, root); -- 2.39.2