summaryrefslogtreecommitdiff
path: root/src/callproc.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-12-07 06:46:45 +0000
committerRichard M. Stallman <rms@gnu.org>2001-12-07 06:46:45 +0000
commit70ec13773ab0b175f5992cec8f4441a760fd9e93 (patch)
treed18f58f21ee2eae4119b84e2552f6b7781a00905 /src/callproc.c
parent120d77d8211ab7c649a8896c842bda36a50efc10 (diff)
downloademacs-70ec13773ab0b175f5992cec8f4441a760fd9e93.tar.gz
(init_callproc): Set Vdata_directory based on the source
location whenever Emacs was not run installed.
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 23f2b377b43..f35485f9fe8 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1489,7 +1489,11 @@ init_callproc ()
#ifndef DOS_NT
/* MSDOS uses wrapped binaries, so don't do this. */
if (NILP (Fmember (tem, Vexec_path)))
- Vexec_path = nconc2 (Vexec_path, Fcons (tem, Qnil));
+ {
+ Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC);
+ Vexec_path = Fcons (tem, Vexec_path);
+ Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path);
+ }
Vexec_directory = Ffile_name_as_directory (tem);
#endif /* not DOS_NT */
@@ -1512,12 +1516,15 @@ init_callproc ()
source directory. */
if (data_dir == 0)
{
- Lisp_Object tem, tem1, newdir;
+ Lisp_Object tem, tem1, srcdir;
+ srcdir = Fexpand_file_name (build_string ("../src/"),
+ build_string (PATH_DUMPLOADSEARCH));
tem = Fexpand_file_name (build_string ("GNU"), Vdata_directory);
tem1 = Ffile_exists_p (tem);
- if (NILP (tem1))
+ if (!NILP (Fequal (srcdir, Vinvocation_directory)) || NILP (tem1))
{
+ Lisp_Object newdir;
newdir = Fexpand_file_name (build_string ("../etc/"),
build_string (PATH_DUMPLOADSEARCH));
tem = Fexpand_file_name (build_string ("GNU"), newdir);