aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-11 21:44:08 +0000
committerRichard M. Stallman1997-08-11 21:44:08 +0000
commit5d7e8345557656c240b0305366d51f1b8e4bcc40 (patch)
treef4aaf2b94947c291d54b96ea0b753a6bfe5bca2d /src
parente089dc624ffa09ad747e6e837f8fb4d96cfae31d (diff)
downloademacs-5d7e8345557656c240b0305366d51f1b8e4bcc40.tar.gz
emacs-5d7e8345557656c240b0305366d51f1b8e4bcc40.zip
(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.
Diffstat (limited to 'src')
-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)
591 else 591 else
592 fp = intern_face (selected_frame, FRAME_COMPUTED_FACES (foo)[face]); 592 fp = intern_face (selected_frame, FRAME_COMPUTED_FACES (foo)[face]);
593 if (termscript) 593 if (termscript)
594 fprintf (termscript, "<FACE:%d:%d>", FACE_FOREGROUND (fp), FACE_BACKGROUND (fp)); 594 fprintf (termscript, "<FACE %d: %d/%d>",
595 face, FACE_FOREGROUND (fp), FACE_BACKGROUND (fp));
595 screen_face = face; 596 screen_face = face;
596 ScreenAttrib = (FACE_BACKGROUND (fp) << 4) | FACE_FOREGROUND (fp); 597 ScreenAttrib = (FACE_BACKGROUND (fp) << 4) | FACE_FOREGROUND (fp);
597} 598}
@@ -2708,10 +2709,12 @@ init_environment (argc, argv, skip_args)
2708 while (len > 0 && root[len] != '/' && root[len] != ':') 2709 while (len > 0 && root[len] != '/' && root[len] != ':')
2709 len--; 2710 len--;
2710 root[len] = '\0'; 2711 root[len] = '\0';
2711 if (len > 4 && strcmp (root + len - 4, "/bin") == 0) 2712 if (len > 4
2713 && (strcmp (root + len - 4, "/bin") == 0
2714 || strcmp (root + len - 4, "/src") == 0)) /* under a debugger */
2712 root[len - 4] = '\0'; 2715 root[len - 4] = '\0';
2713 else 2716 else
2714 strcpy (root, "c:/emacs"); /* Only under debuggers, I think. */ 2717 strcpy (root, "c:/emacs"); /* let's be defensive */
2715 len = strlen (root); 2718 len = strlen (root);
2716 strcpy (emacsroot, root); 2719 strcpy (emacsroot, root);
2717 2720