diff options
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 | } |