summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-08-11 21:44:08 +0000
committerRichard M. Stallman <rms@gnu.org>1997-08-11 21:44:08 +0000
commit451aeb2d1d2961b2d0c92afad1cbe5c434722da3 (patch)
tree00918cc675399fdb8e32b47c9955ac3a04bdced1
parent6d91ca34273b2a10baff319de3fec50818f0cc74 (diff)
downloademacs-451aeb2d1d2961b2d0c92afad1cbe5c434722da3.tar.gz
(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.
-rw-r--r--src/msdos.c9
1 files 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:%d:%d>", FACE_FOREGROUND (fp), FACE_BACKGROUND (fp));
+ fprintf (termscript, "<FACE %d: %d/%d>",
+ 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);