diff options
| author | Glenn Morris | 2012-07-09 17:28:39 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-07-09 17:28:39 -0400 |
| commit | cbb319513e0da14e7de2e9be121d449b6bcc8d88 (patch) | |
| tree | 755535990ffe26b56cf2057ad7d2016e9048e9e3 /src/callproc.c | |
| parent | 7c4e8ec014e532c3864a7e2494d71a663d96b295 (diff) | |
| download | emacs-cbb319513e0da14e7de2e9be121d449b6bcc8d88.tar.gz emacs-cbb319513e0da14e7de2e9be121d449b6bcc8d88.zip | |
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) | |||
| 1519 | char *doc_dir = egetenv ("EMACSDOC"); | 1519 | char *doc_dir = egetenv ("EMACSDOC"); |
| 1520 | #ifdef HAVE_NS | 1520 | #ifdef HAVE_NS |
| 1521 | const char *etc_dir = ns_etc_directory (); | 1521 | const char *etc_dir = ns_etc_directory (); |
| 1522 | const char *path_exec = ns_exec_path (); | ||
| 1522 | #endif | 1523 | #endif |
| 1523 | 1524 | ||
| 1524 | Vdata_directory | 1525 | Vdata_directory |
| @@ -1540,8 +1541,13 @@ init_callproc_1 (void) | |||
| 1540 | 1541 | ||
| 1541 | /* Check the EMACSPATH environment variable, defaulting to the | 1542 | /* Check the EMACSPATH environment variable, defaulting to the |
| 1542 | PATH_EXEC path from epaths.h. */ | 1543 | PATH_EXEC path from epaths.h. */ |
| 1543 | Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC); | 1544 | Vexec_path = decode_env_path ("EMACSPATH", |
| 1545 | #ifdef HAVE_NS | ||
| 1546 | path_exec ? path_exec : | ||
| 1547 | #endif | ||
| 1548 | PATH_EXEC); | ||
| 1544 | Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path)); | 1549 | Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path)); |
| 1550 | /* FIXME? For ns, path_exec should go at the front? */ | ||
| 1545 | Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); | 1551 | Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); |
| 1546 | } | 1552 | } |
| 1547 | 1553 | ||
| @@ -1576,7 +1582,14 @@ init_callproc (void) | |||
| 1576 | /* MSDOS uses wrapped binaries, so don't do this. */ | 1582 | /* MSDOS uses wrapped binaries, so don't do this. */ |
| 1577 | if (NILP (Fmember (tem, Vexec_path))) | 1583 | if (NILP (Fmember (tem, Vexec_path))) |
| 1578 | { | 1584 | { |
| 1579 | Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC); | 1585 | #ifdef HAVE_NS |
| 1586 | const char *path_exec = ns_exec_path (); | ||
| 1587 | #endif | ||
| 1588 | Vexec_path = decode_env_path ("EMACSPATH", | ||
| 1589 | #ifdef HAVE_NS | ||
| 1590 | path_exec ? path_exec : | ||
| 1591 | #endif | ||
| 1592 | PATH_EXEC); | ||
| 1580 | Vexec_path = Fcons (tem, Vexec_path); | 1593 | Vexec_path = Fcons (tem, Vexec_path); |
| 1581 | Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); | 1594 | Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); |
| 1582 | } | 1595 | } |