X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d259328fb87db8cc67d52771efcfa653e52c5b71..9f2f14a0725211b13a744573344636b57b9c98b9:/src/emacs.c diff --git a/src/emacs.c b/src/emacs.c index 2e9f950851..926aa989e6 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -761,6 +761,9 @@ main (int argc, char **argv) names between UTF-8 and the system's ANSI codepage. */ maybe_load_unicows_dll (); #endif + /* This has to be done before module_init is called below, so that + the latter could use the thread ID of the main thread. */ + w32_init_main_thread (); #endif #ifdef RUN_TIME_REMAP @@ -776,6 +779,10 @@ main (int argc, char **argv) atexit (close_output_streams); +#ifdef HAVE_MODULES + module_init (); +#endif + sort_args (argc, argv); argc = 0; while (argv[argc]) argc++; @@ -1454,6 +1461,11 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem syms_of_terminal (); syms_of_term (); syms_of_undo (); + +#ifdef HAVE_MODULES + syms_of_module (); +#endif + #ifdef HAVE_SOUND syms_of_sound (); #endif