diff options
Diffstat (limited to 'src/emacs.c')
-rw-r--r-- | src/emacs.c | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/src/emacs.c b/src/emacs.c index 0fec7167588..4e812b19a0f 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1610,20 +1610,17 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem keys_of_keymap (); keys_of_window (); } - else - { - /* Initialization that must be done even if the global variable - initialized is non zero. */ + /* Initialization that must be done even if the global variable + initialized is non zero. */ #ifdef HAVE_NTGUI - globals_of_w32font (); - globals_of_w32fns (); - globals_of_w32menu (); + globals_of_w32font (); + globals_of_w32fns (); + globals_of_w32menu (); #endif /* HAVE_NTGUI */ #if defined WINDOWSNT || defined HAVE_NTGUI - globals_of_w32select (); + globals_of_w32select (); #endif - } init_charset (); @@ -1673,9 +1670,26 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem #endif Vtop_level = list2 (Qload, build_unibyte_string (file)); } - /* Unless next switch is -nl, load "loadup.el" first thing. */ if (! no_loadup) - Vtop_level = list2 (Qload, build_string ("loadup.el")); + /* Unless next switch is -nl, load "dumped.elc" first thing. + If it fails, we won't be able to run. */ + { + /* We could let the user see that we're (still) loading the + Lisp environment, but the "done" message will hide the + "For information about..." message that we want displayed + when we're finished. */ + Lisp_Object load = list4 (Qload, + build_string ("../src/dumped.elc"), + Qnil, Qt); + /* XXX We need a way for Lisp to cause Emacs to exit, with + an error message to stderr after restoring tty modes. */ + /* (condition-case nil bodyform (file-missing (kill-emacs 42))) */ + Vtop_level = list4 (Qcondition_case, + Qnil, + load, + list2 (Qfile_missing, + list2 (Qkill_emacs, make_number (42)))); + } } /* Set up for profiling. This is known to work on FreeBSD, @@ -2506,6 +2520,7 @@ syms_of_emacs (void) DEFSYM (Qrisky_local_variable, "risky-local-variable"); DEFSYM (Qkill_emacs, "kill-emacs"); DEFSYM (Qkill_emacs_hook, "kill-emacs-hook"); + DEFSYM (Qcondition_case, "condition-case"); #ifndef CANNOT_DUMP defsubr (&Sdump_emacs); |