aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuanma Barranquero2011-12-08 00:14:13 +0100
committerJuanma Barranquero2011-12-08 00:14:13 +0100
commit6e44397c4a000df50237a57ef089989e6c4bbc5e (patch)
tree7af126f24c58f6e658bc72604cd2489670156e33 /src
parent1ea1c2fa5ffe544ddd96565e0958f12e8698136b (diff)
downloademacs-6e44397c4a000df50237a57ef089989e6c4bbc5e.tar.gz
emacs-6e44397c4a000df50237a57ef089989e6c4bbc5e.zip
src/w32.c: Implement --no-site-lisp on Windows (bug#10208).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/w32.c18
2 files changed, 23 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f8d290774fc..9ee5ccc1f5e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-12-07 Juanma Barranquero <lekktu@gmail.com>
2
3 * w32.c (init_environment): If no_site_lisp, remove site-lisp
4 dirs from the default value of EMACSLOADPATH (bug#10208).
5
12011-12-07 Glenn Morris <rgm@gnu.org> 62011-12-07 Glenn Morris <rgm@gnu.org>
2 7
3 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in 8 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
diff --git a/src/w32.c b/src/w32.c
index 304445e2238..b26327462d8 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1654,6 +1654,24 @@ init_environment (char ** argv)
1654 } 1654 }
1655 } 1655 }
1656 1656
1657 /* When Emacs is invoked with --no-site-lisp, we must remove the
1658 site-lisp directories from the default value of EMACSLOADPATH.
1659 This assumes that the site-lisp entries are at the front, and
1660 that additional entries do exist. */
1661 if (no_site_lisp)
1662 {
1663 for (i = 0; i < N_ENV_VARS; i++)
1664 {
1665 if (strcmp (env_vars[i].name, "EMACSLOADPATH") == 0)
1666 {
1667 char *site;
1668 while ((site = strstr (env_vars[i].def_value, "site-lisp")))
1669 env_vars[i].def_value = strchr (site, ';') + 1;
1670 break;
1671 }
1672 }
1673 }
1674
1657#define SET_ENV_BUF_SIZE (4 * MAX_PATH) /* to cover EMACSLOADPATH */ 1675#define SET_ENV_BUF_SIZE (4 * MAX_PATH) /* to cover EMACSLOADPATH */
1658 1676
1659 /* Treat emacs_dir specially: set it unconditionally based on our 1677 /* Treat emacs_dir specially: set it unconditionally based on our