changeset 18395:4b6ab0b6fd50

(Fdump_emacs): Bind command-line-processed to nil here.
author Richard M. Stallman <rms@gnu.org>
date Mon, 23 Jun 1997 01:37:22 +0000
parents d249b1ae0a02
children 881264eb1346
files src/emacs.c
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/emacs.c	Mon Jun 23 00:47:19 1997 +0000
+++ b/src/emacs.c	Mon Jun 23 01:37:22 1997 +0000
@@ -1486,20 +1486,24 @@
 Take symbols from SYMFILE (presumably the file you executed to run Emacs).\n\
 This is used in the file `loadup.el' when building Emacs.\n\
 \n\
-Bind `command-line-processed' to nil before dumping,\n\
-if you want the dumped Emacs to process its command line\n\
-and announce itself normally when it is run.\n\
-\n\
 You must run Emacs in batch mode in order to dump it.")
   (filename, symfile)
      Lisp_Object filename, symfile;
 {
   extern char my_edata[];
   Lisp_Object tem;
+  Lisp_Object symbol;
+  int count = specpdl_ptr - specpdl;
 
   if (! noninteractive)
     error ("Dumping Emacs works only in batch mode");
 
+  /* Bind `command-line-processed' to nil before dumping,
+     so that the dumped Emacs will process its command line
+     and set up to work with X windows if appropriate.  */
+  symbol = intern ("command-line-process");
+  specbind (symbol, Qnil);
+
   CHECK_STRING (filename, 0);
   filename = Fexpand_file_name (filename, Qnil);
   if (!NILP (symfile))
@@ -1545,7 +1549,7 @@
 
   Vpurify_flag = tem;
 
-  return Qnil;
+  return unbind_to (count, Qnil);
 }
 
 #endif /* not HAVE_SHM */