Subject: bug#11612: 24.1; Defaults create warning on startup

From: Noam Postavsky <[email-masked]>
Date: Sat, 25 Jun 2016 09:42:31 -0400

On Sat, Jun 25, 2016 at 4:16 AM, Eli Zaretskii <[email-masked]> wrote:
>
> FWIW, repeating the OP's recipe, Emacs now starts with a split-window
> configuration, with the selected window showing the *scratch* buffer,
> and the *Warnings* buffer displaying the above-mentioned warning.  So
> I'm not sure the original complaint is still valid.

I think the complaint is more about the wording of the message and
less about the buffer/window configuration. So I propose rewording it
to

    Use of `C:\.emacs' to define `HOME' is deprecated, see (emacs)
`Windows Home'

This way the user will be pointed to the relevant section of the
manual, and since the warning uses the same phrasing as the manual,
searching for the warning should turn up links to that manual section
as well.
From 7f005e4fbde188125204aae5ca0620dc953179ad Mon Sep 17 00:00:00 2001
From: Noam Postavsky <[email-masked]>
Date: Sat, 25 Jun 2016 09:26:12 -0400
Subject: [PATCH] Give more helpful warning about setting HOME

* src/w32.c (init_environment): Improve warning message that pops when
Emacs sets HOME according to existence of C:\.emacs (Bug #11612).
---
 src/w32.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/w32.c b/src/w32.c
index c26f145..f37cb62 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -2773,9 +2773,12 @@ init_environment (char ** argv)
 		  }
 		if (strcmp (env_vars[i].name, "HOME") == 0 && !appdata)
 		  Vdelayed_warnings_list
-		    = Fcons (listn (CONSTYPE_HEAP, 2,
-				    intern ("initialization"),
-				    build_string ("Setting HOME to C:\\ by default is deprecated")),
+                    = Fcons (listn
+                             (CONSTYPE_HEAP, 2,
+                              intern ("initialization"),
+                              build_string ("Use of `C:\\.emacs' to "
+                                            "define `HOME' is deprecated,"
+                                            "see (emacs) `Windows Home'.")),
 			     Vdelayed_warnings_list);
 	      }
 
-- 
2.8.0