>>>> "Gunnar" == Gunnar Evermann
<ge204(a)eng.cam.ac.uk> writes:
Gunnar> I reported this some time ago and explained the cause. See
Gunnar> message <87k8dna3ma.fsf(a)eng.cam.ac.uk> on xemacs-beta. I
Gunnar> was hoping Olvier could come up with a fix.
>>>> "Stephen" == Stephen J Turnbull
<turnbull(a)sk.tsukuba.ac.jp> writes:
Stephen> A quick look suggests that all of the variables computed
Stephen> by the very early command-line parsing stuff should be
Stephen> protected in the way that `noninteractive' is, and
Stephen> immediately after loading the dumpfile they should be
Stephen> restored.
Here's a patch against a 12-hour-old CVS update that does this. I
haven't checked the other variables it's supposed to preserve but I
have checked that it (a) builds and runs and (b) -debug-paths and
-no-autoloads now work (a very quick check). I _think_ I got all of
the variables that can get stepped on.
I'm not sure where the "unstomp" code belongs; it may want to move out
of the "if" it's in now, just after the line "purify_flag = 1".
Or it
may belong in dumper.c where Olivier put it.
Olivier?
Sorry about the preprocessor conditionals, but I want it to be easy to
back this out when the right stuff comes along....
Index: src/emacs.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/emacs.c,v
retrieving revision 1.82.2.72
diff -u -r1.82.2.72 emacs.c
--- emacs.c 2000/08/31 07:33:20 1.82.2.72
+++ emacs.c 2000/09/01 17:10:25
@@ -1120,9 +1120,42 @@
initialized = 0;
purify_flag = 1;
} else {
+
+#ifdef UNSTOMP_PDUMP_STOMPED_ARGS
+ /* noninteractive is protected elsewhere */
+ int inhibit_early_packages_save = inhibit_early_packages;
+ int inhibit_autoloads_save = inhibit_autoloads;
+ int debug_paths_save = debug_paths;
+#ifdef INHIBIT_SITE_LISP
+ int inhibit_site_lisp_save = inhibit_site_lisp;
+#endif
+#ifdef INHIBIT_SITE_MODULES
+ int inhibit_site_modules_save = inhibit_site_modules;
+#endif
+#endif
+
initialized = pdump_load (argv[0]);
if (initialized)
- run_temacs_argc = -1;
+ {
+ run_temacs_argc = -1;
+
+#ifdef UNSTOMP_PDUMP_STOMPED_ARGS
+ /* Put back noninteractive1 to its real value */
+ /* #### SJT Moved from pdump_load_finish() */
+ noninteractive1 = noninteractive;
+ /* Now unstomp everything else */
+ inhibit_early_packages = inhibit_early_packages_save;
+ inhibit_autoloads = inhibit_autoloads_save;
+ debug_paths = debug_paths_save;
+#ifdef INHIBIT_SITE_LISP
+ inhibit_site_lisp = inhibit_site_lisp_save;
+#endif
+#ifdef INHIBIT_SITE_MODULES
+ inhibit_site_modules = inhibit_site_modules_save;
+#endif
+#endif
+
+ }
else
purify_flag = 1;
}
@@ -3320,6 +3353,9 @@
#endif
Vxemacs_codename = build_string (XEMACS_CODENAME);
+ /* Lisp variables which contain command line flags.
+ The portable dumper stomps on these; they must be saved and restored
+ in main_1(). */
DEFVAR_BOOL ("noninteractive", &noninteractive1 /*
Non-nil means XEmacs is running without interactive terminal.
*/ );
Index: src/dumper.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/Attic/dumper.c,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 dumper.c
--- dumper.c 2000/07/21 10:15:57 1.1.2.7
+++ dumper.c 2000/09/01 17:10:25
@@ -1103,8 +1103,11 @@
p += sizeof (Lisp_Object) * rt.count;
}
+#ifndef UNSTOMP_PDUMP_STOMPED_ARGS
/* Put back noninteractive1 to its real value */
+ /* #### SJT Moved this to just after call to pdump_load() in main() */
noninteractive1 = noninteractive;
+#endif
return 1;
}
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."