diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2011-04-28 21:51:12 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2011-04-28 21:51:12 +0200 |
commit | fdc5744d4f448c2250d798b0c271910cd6254f2d (patch) | |
tree | 05fec6686183f9268881041f9e9ad44afc6d0937 /src/w32.c | |
parent | 08abfaad86031776b5c01de4d6a8cadb4986896b (diff) | |
download | emacs-fdc5744d4f448c2250d798b0c271910cd6254f2d.tar.gz |
src/w32.c (init_environment): Warn about defaulting HOME to C:\.
Diffstat (limited to 'src/w32.c')
-rw-r--r-- | src/w32.c | 14 |
1 files changed, 13 insertions, 1 deletions
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) |