summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 @@
2011-04-28 Juanma Barranquero <lekktu@gmail.com>
+ * w32.c (init_environment): Warn about defaulting HOME to C:\.
+
+2011-04-28 Juanma Barranquero <lekktu@gmail.com>
+
* keyboard.c (Qdelayed_warnings_hook): Define.
(command_loop_1): Run `delayed-warnings-hook'
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)
char locale_name[32];
struct stat ignored;
char default_home[MAX_PATH];
+ int appdata = 0;
static const struct env_entry
{
@@ -1614,7 +1615,10 @@ init_environment (char ** argv)
/* If we can't get the appdata dir, revert to old behavior. */
if (profile_result == S_OK)
- env_vars[0].def_value = default_home;
+ {
+ env_vars[0].def_value = default_home;
+ appdata = 1;
+ }
}
}
@@ -1701,6 +1705,14 @@ init_environment (char ** argv)
lpval = env_vars[i].def_value;
dwType = REG_EXPAND_SZ;
dont_free = 1;
+ if (!strcmp (env_vars[i].name, "HOME") && !appdata)
+ {
+ Lisp_Object warning[2];
+ warning[0] = intern ("initialization");
+ warning[1] = build_string ("Setting HOME to C:\\ by default is deprecated");
+ Vdelayed_warnings_list = Fcons (Flist (2, warning),
+ Vdelayed_warnings_list);
+ }
}
if (lpval)