]> git.eshelyaron.com Git - emacs.git/commitdiff
(init_callproc): Set Vdata_directory based on the source
authorRichard M. Stallman <rms@gnu.org>
Fri, 7 Dec 2001 06:46:45 +0000 (06:46 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 7 Dec 2001 06:46:45 +0000 (06:46 +0000)
location whenever Emacs was not run installed.

src/ChangeLog
src/callproc.c

index 9bc1a284be22d2976ec84d6fe359546fa6463dd3..23e7753092a3a6753ce01fa43880e1d1cedbf5e7 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-07  Richard M. Stallman  <rms@gnu.org>
+
+       * callproc.c (init_callproc): Set Vdata_directory based on the source
+       location whenever Emacs was run uninstalled.
+
 2001-12-06  Paul Eggert  <eggert@twinsun.com>
 
        * config.in (HAVE_WORKING_VFORK): New #undefs.
index 23f2b377b43e2c482f162a93e7975d7e4f14ede8..f35485f9fe8a4a22aaa1c515832deea0b249fd63 100644 (file)
@@ -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);