# HG changeset patch # User Richard M. Stallman # Date 1007707539 0 # Node ID 56385cb63c61db00534ae0d1b129d0b1128012c3 # Parent 7a9cd78d4b0e61970f5ce9498cc5b33e4989e9c9 (init_callproc): Set Vdata_directory based on the source location whenever Emacs was not run installed. diff -r 7a9cd78d4b0e -r 56385cb63c61 src/callproc.c --- a/src/callproc.c Fri Dec 07 05:55:41 2001 +0000 +++ b/src/callproc.c Fri Dec 07 06:45:39 2001 +0000 @@ -1489,7 +1489,11 @@ #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 @@ 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);