aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuanma Barranquero2011-04-28 21:51:12 +0200
committerJuanma Barranquero2011-04-28 21:51:12 +0200
commitfdc5744d4f448c2250d798b0c271910cd6254f2d (patch)
tree05fec6686183f9268881041f9e9ad44afc6d0937 /src
parent08abfaad86031776b5c01de4d6a8cadb4986896b (diff)
downloademacs-fdc5744d4f448c2250d798b0c271910cd6254f2d.tar.gz
emacs-fdc5744d4f448c2250d798b0c271910cd6254f2d.zip
src/w32.c (init_environment): Warn about defaulting HOME to C:\.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/w32.c14
2 files changed, 17 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e20feb0f6f7..555fb9589f5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12011-04-28 Juanma Barranquero <lekktu@gmail.com> 12011-04-28 Juanma Barranquero <lekktu@gmail.com>
2 2
3 * w32.c (init_environment): Warn about defaulting HOME to C:\.
4
52011-04-28 Juanma Barranquero <lekktu@gmail.com>
6
3 * keyboard.c (Qdelayed_warnings_hook): Define. 7 * keyboard.c (Qdelayed_warnings_hook): Define.
4 (command_loop_1): Run `delayed-warnings-hook' 8 (command_loop_1): Run `delayed-warnings-hook'
5 if Vdelayed_warnings_list is non-nil. 9 if Vdelayed_warnings_list is non-nil.
diff --git a/src/w32.c b/src/w32.c
index 2fbb3b6cb4c..230ccc8de10 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1561,6 +1561,7 @@ init_environment (char ** argv)
1561 char locale_name[32]; 1561 char locale_name[32];
1562 struct stat ignored; 1562 struct stat ignored;
1563 char default_home[MAX_PATH]; 1563 char default_home[MAX_PATH];
1564 int appdata = 0;
1564 1565
1565 static const struct env_entry 1566 static const struct env_entry
1566 { 1567 {
@@ -1614,7 +1615,10 @@ init_environment (char ** argv)
1614 1615
1615 /* If we can't get the appdata dir, revert to old behavior. */ 1616 /* If we can't get the appdata dir, revert to old behavior. */
1616 if (profile_result == S_OK) 1617 if (profile_result == S_OK)
1617 env_vars[0].def_value = default_home; 1618 {
1619 env_vars[0].def_value = default_home;
1620 appdata = 1;
1621 }
1618 } 1622 }
1619 } 1623 }
1620 1624
@@ -1701,6 +1705,14 @@ init_environment (char ** argv)
1701 lpval = env_vars[i].def_value; 1705 lpval = env_vars[i].def_value;
1702 dwType = REG_EXPAND_SZ; 1706 dwType = REG_EXPAND_SZ;
1703 dont_free = 1; 1707 dont_free = 1;
1708 if (!strcmp (env_vars[i].name, "HOME") && !appdata)
1709 {
1710 Lisp_Object warning[2];
1711 warning[0] = intern ("initialization");
1712 warning[1] = build_string ("Setting HOME to C:\\ by default is deprecated");
1713 Vdelayed_warnings_list = Fcons (Flist (2, warning),
1714 Vdelayed_warnings_list);
1715 }
1704 } 1716 }
1705 1717
1706 if (lpval) 1718 if (lpval)