diff options
author | Glenn Morris <rgm@gnu.org> | 2012-07-09 17:28:39 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2012-07-09 17:28:39 -0400 |
commit | cbb319513e0da14e7de2e9be121d449b6bcc8d88 (patch) | |
tree | 755535990ffe26b56cf2057ad7d2016e9048e9e3 /src/callproc.c | |
parent | 7c4e8ec014e532c3864a7e2494d71a663d96b295 (diff) | |
download | emacs-cbb319513e0da14e7de2e9be121d449b6bcc8d88.tar.gz |
Stop ns builds setting the EMACSPATH environment variable
Ref bugs 4309, 6401, etc
* src/nsterm.m (ns_exec_path): New function, split from ns_init_paths.
(ns_init_paths): Do not set EMACSPATH.
* src/nsterm.h (ns_exec_path): Add it.
* src/callproc.c (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_exec_path.
Diffstat (limited to 'src/callproc.c')
-rw-r--r-- | src/callproc.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/callproc.c b/src/callproc.c index 52825bc9dc2..facca887772 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1519,6 +1519,7 @@ init_callproc_1 (void) char *doc_dir = egetenv ("EMACSDOC"); #ifdef HAVE_NS const char *etc_dir = ns_etc_directory (); + const char *path_exec = ns_exec_path (); #endif Vdata_directory @@ -1540,8 +1541,13 @@ init_callproc_1 (void) /* Check the EMACSPATH environment variable, defaulting to the PATH_EXEC path from epaths.h. */ - Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC); + Vexec_path = decode_env_path ("EMACSPATH", +#ifdef HAVE_NS + path_exec ? path_exec : +#endif + PATH_EXEC); Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path)); + /* FIXME? For ns, path_exec should go at the front? */ Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); } @@ -1576,7 +1582,14 @@ init_callproc (void) /* MSDOS uses wrapped binaries, so don't do this. */ if (NILP (Fmember (tem, Vexec_path))) { - Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC); +#ifdef HAVE_NS + const char *path_exec = ns_exec_path (); +#endif + Vexec_path = decode_env_path ("EMACSPATH", +#ifdef HAVE_NS + path_exec ? path_exec : +#endif + PATH_EXEC); Vexec_path = Fcons (tem, Vexec_path); Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); } |