changeset 108603:135d8ad190d8

* emacs.c (main): Initialize initial-environment and process-environment before generating from env, not after.
author Ken Raeburn <raeburn@raeburn.org>
date Sat, 15 May 2010 17:16:20 -0400
parents ed8614d73caa
children 3b0bab58a95f
files src/ChangeLog src/emacs.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat May 15 17:12:44 2010 -0400
+++ b/src/ChangeLog	Sat May 15 17:16:20 2010 -0400
@@ -1,5 +1,8 @@
 2010-05-15  Ken Raeburn  <raeburn@raeburn.org>
 
+	* emacs.c (main): Initialize initial-environment and
+	process-environment before generating from env, not after.
+
 	Handle --version reasonably in CANNOT_DUMP configuration.
 	* emacs.c (emacs_version, emacs_copyright): New string variables.
 	(Vemacs_version, Vemacs_copyright): New Lisp_Object variables.
--- a/src/emacs.c	Sat May 15 17:12:44 2010 -0400
+++ b/src/emacs.c	Sat May 15 17:16:20 2010 -0400
@@ -1543,6 +1543,11 @@
     ns_init_paths ();
 #endif
 
+  /* Initialize and GC-protect Vinitial_environment and
+     Vprocess_environment before set_initial_environment fills them
+     in.  */
+  if (!initialized)
+    syms_of_callproc ();
   /* egetenv is a pretty low-level facility, which may get called in
      many circumstances; it seems flimsy to put off initializing it
      until calling init_callproc.  */
@@ -1592,7 +1597,6 @@
       syms_of_callint ();
       syms_of_casefiddle ();
       syms_of_casetab ();
-      syms_of_callproc ();
       syms_of_category ();
       syms_of_ccl ();
       syms_of_character ();