aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
authorEli Zaretskii2012-08-04 17:17:10 +0300
committerEli Zaretskii2012-08-04 17:17:10 +0300
commit76151e2ce70d4c0fec8f3dfda62a92e0430528dc (patch)
tree82912651eaa2ddbcd79ffe7e46fb3018d9880ad8 /src/callproc.c
parenta09508f27e7cda2817211ee33a9d55e5575da0a6 (diff)
downloademacs-76151e2ce70d4c0fec8f3dfda62a92e0430528dc.tar.gz
emacs-76151e2ce70d4c0fec8f3dfda62a92e0430528dc.zip
Fix bug #11959 with startup warnings on MS-Windows about ../site-lisp.
src/w32.c (init_environment): Change the default values of many environment variables in dflt_envvars[] to NULL, to avoid pushing them into environment when they were not already defined. Remove the code that deletes site-lisp subdirectories from the default value of EMACSLOADPATH, as it is no longer needed. (check_windows_init_file): Now external, not static. Use Vload_path as is, without adding anything, as this function is now called when Vload_path is already set up. src/w32.h (check_windows_init_file): Add prototype. src/emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build directory, ignore the /*/i386/ tail in Vinvocation_directory, for compatibility with Posix platforms. (main): Move the call to check_windows_init_file to here from w32.c. (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if any, in the DEFALT argument into the root of the Emacs build or installation tree, as appropriate. src/callproc.c (init_callproc_1): Call decode_env_path instead of doing its equivalent by hand. (init_callproc): Replace DOS_NT condition with MSDOS, thus letting the code that sets Vexec_path run on MS-Windows. src/lread.c (init_lread): Add comments to #ifdef's. nt/paths.h (PATH_LOADSEARCH, PATH_SITELOADSEARCH, PATH_EXEC) (PATH_DATA, PATH_DOC): Replace dummy directory names with directories relative to %emacs_dir%. (PATH_EXEC): Add lib-src/oo-spd/i386 and lib-src/oo/i386, to cater to the use case of running un-installed Emacs.
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c27
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)
1513void 1513void
1514init_callproc_1 (void) 1514init_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)