summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 2e9f950851a..926aa989e6a 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