diff options
| author | Juanma Barranquero | 2011-04-28 21:51:12 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2011-04-28 21:51:12 +0200 |
| commit | fdc5744d4f448c2250d798b0c271910cd6254f2d (patch) | |
| tree | 05fec6686183f9268881041f9e9ad44afc6d0937 /src | |
| parent | 08abfaad86031776b5c01de4d6a8cadb4986896b (diff) | |
| download | emacs-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/ChangeLog | 4 | ||||
| -rw-r--r-- | src/w32.c | 14 |
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 @@ | |||
| 1 | 2011-04-28 Juanma Barranquero <lekktu@gmail.com> | 1 | 2011-04-28 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 2 | ||
| 3 | * w32.c (init_environment): Warn about defaulting HOME to C:\. | ||
| 4 | |||
| 5 | 2011-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. |
| @@ -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) |