diff options
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/callproc.c b/src/callproc.c index 5eabd689188..10a80168fb2 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1513,29 +1513,24 @@ egetenv (const char *var) | |||
| 1513 | void | 1513 | void |
| 1514 | init_callproc_1 (void) | 1514 | init_callproc_1 (void) |
| 1515 | { | 1515 | { |
| 1516 | char *data_dir = egetenv ("EMACSDATA"); | ||
| 1517 | char *doc_dir = egetenv ("EMACSDOC"); | ||
| 1518 | #ifdef HAVE_NS | 1516 | #ifdef HAVE_NS |
| 1519 | const char *etc_dir = ns_etc_directory (); | 1517 | const char *etc_dir = ns_etc_directory (); |
| 1520 | const char *path_exec = ns_exec_path (); | 1518 | const char *path_exec = ns_exec_path (); |
| 1521 | #endif | 1519 | #endif |
| 1522 | 1520 | ||
| 1523 | Vdata_directory | 1521 | Vdata_directory = decode_env_path ("EMACSDATA", |
| 1524 | = Ffile_name_as_directory (build_string (data_dir ? data_dir | ||
| 1525 | #ifdef HAVE_NS | 1522 | #ifdef HAVE_NS |
| 1526 | : (etc_dir ? etc_dir : PATH_DATA) | 1523 | etc_dir ? etc_dir : |
| 1527 | #else | ||
| 1528 | : PATH_DATA | ||
| 1529 | #endif | 1524 | #endif |
| 1530 | )); | 1525 | PATH_DATA); |
| 1531 | Vdoc_directory | 1526 | Vdata_directory = Ffile_name_as_directory (Fcar (Vdata_directory)); |
| 1532 | = Ffile_name_as_directory (build_string (doc_dir ? doc_dir | 1527 | |
| 1528 | Vdoc_directory = decode_env_path ("EMACSDOC", | ||
| 1533 | #ifdef HAVE_NS | 1529 | #ifdef HAVE_NS |
| 1534 | : (etc_dir ? etc_dir : PATH_DOC) | 1530 | etc_dir ? etc_dir : |
| 1535 | #else | ||
| 1536 | : PATH_DOC | ||
| 1537 | #endif | 1531 | #endif |
| 1538 | )); | 1532 | PATH_DOC); |
| 1533 | Vdoc_directory = Ffile_name_as_directory (Fcar (Vdoc_directory)); | ||
| 1539 | 1534 | ||
| 1540 | /* Check the EMACSPATH environment variable, defaulting to the | 1535 | /* Check the EMACSPATH environment variable, defaulting to the |
| 1541 | PATH_EXEC path from epaths.h. */ | 1536 | PATH_EXEC path from epaths.h. */ |
| @@ -1576,7 +1571,7 @@ init_callproc (void) | |||
| 1576 | Lisp_Object tem; | 1571 | Lisp_Object tem; |
| 1577 | tem = Fexpand_file_name (build_string ("lib-src"), | 1572 | tem = Fexpand_file_name (build_string ("lib-src"), |
| 1578 | Vinstallation_directory); | 1573 | Vinstallation_directory); |
| 1579 | #ifndef DOS_NT | 1574 | #ifndef MSDOS |
| 1580 | /* MSDOS uses wrapped binaries, so don't do this. */ | 1575 | /* MSDOS uses wrapped binaries, so don't do this. */ |
| 1581 | if (NILP (Fmember (tem, Vexec_path))) | 1576 | if (NILP (Fmember (tem, Vexec_path))) |
| 1582 | { | 1577 | { |
| @@ -1593,7 +1588,7 @@ init_callproc (void) | |||
| 1593 | } | 1588 | } |
| 1594 | 1589 | ||
| 1595 | Vexec_directory = Ffile_name_as_directory (tem); | 1590 | Vexec_directory = Ffile_name_as_directory (tem); |
| 1596 | #endif /* not DOS_NT */ | 1591 | #endif /* not MSDOS */ |
| 1597 | 1592 | ||
| 1598 | /* Maybe use ../etc as well as ../lib-src. */ | 1593 | /* Maybe use ../etc as well as ../lib-src. */ |
| 1599 | if (data_dir == 0) | 1594 | if (data_dir == 0) |