APPROVE COMMIT 21.5
I wrote:
 No, that's due to yet another patch of mine, "Module
extension
 rationalization".  I am clearly trying to make your life as difficult as
 possible, Vin. :-(  Did you configure --without-modules?  It looks like
 you must have, and the logic for handling module auto-autoloads (i.e.,
 ignoring them) is failing in that case.  I'll get it fixed in a jiffy. 
Now I see why the code used to duplicate the list of module extensions
between C and Lisp.  There's no natural place to put it.  I considered
several options, and finally decided to keep the list in C (in
emodules.c, specifically), and to make emodules.c always nonempty.  If
you compile without module support, all it contains is the two variables
module-load-path and module-extensions.
src/ChangeLog addition:
2003-10-14  Jerry James  <james(a)xemacs.org>
	* Makefile.in.in (shlib_objs): Remove emodules.o.
	* Makefile.in.in (objs): Add emodules.o; it always has content now.
	* emacs.c (main_1): Call vars_of_module to define module-extensions.
	* emodules.c: Always set Vmodule_load_path and Vmodule_extensions.
	* emodules.h: Vmodule_load_path is now static.
xemacs-21.5 source patch:
Diff command:   cvs -q diff -uN
Files affected: src/emodules.h src/emodules.c src/emacs.c src/Makefile.in.in
Index: src/Makefile.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/Makefile.in.in,v
retrieving revision 1.105
diff -d -u -r1.105 Makefile.in.in
--- src/Makefile.in.in	2003/09/30 16:46:20	1.105
+++ src/Makefile.in.in	2003/10/15 03:01:04
@@ -223,7 +223,7 @@
 #endif
 
 #ifdef HAVE_SHLIB
-shlib_objs=sysdll.o emodules.o
+shlib_objs=sysdll.o
 # ifdef HAVE_MS_WINDOWS
 export_lib=xemacs-export.o
 xemacs-export.o: xemacs.def
@@ -258,7 +258,7 @@
  console-stream.o\
  data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o\
  dynarr.o \
- editfns.o elhash.o emacs.o eval.o events.o\
+ editfns.o elhash.o emacs.o emodules.o eval.o events.o\
  event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\
  faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \
  font-lock.o frame.o\
Index: src/emacs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emacs.c,v
retrieving revision 1.138
diff -d -u -r1.138 emacs.c
--- src/emacs.c	2003/09/30 15:26:41	1.138
+++ src/emacs.c	2003/10/15 03:01:04
@@ -1811,9 +1811,7 @@
       vars_of_menubar ();
 #endif
       vars_of_minibuf ();
-#ifdef HAVE_SHLIB
       vars_of_module ();
-#endif
 #ifdef WIN32_NATIVE
       vars_of_dired_mswindows ();
       vars_of_nt ();
Index: src/emodules.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emodules.c,v
retrieving revision 1.19
diff -d -u -r1.19 emodules.c
--- src/emodules.c	2003/10/07 21:52:26	1.19
+++ src/emodules.c	2003/10/15 03:01:04
@@ -21,6 +21,12 @@
 #include "emodules.h"
 #include "sysdll.h"
 
+/* Load path */
+static Lisp_Object Vmodule_load_path;
+
+/* Module lFile extensions */
+static Lisp_Object Vmodule_extensions;
+
 #ifdef HAVE_SHLIB
 
 /* CE-Emacs version number */
@@ -33,8 +39,6 @@
    as it allows the unbinding of symbol-value-forward variables. */
 int unloading_module;
 
-/* Load path */
-Lisp_Object Vmodule_load_path;
 Lisp_Object Qdll_error;
 Lisp_Object Qmodule, Qunload_module, module_tag;
 
@@ -49,8 +53,6 @@
   dll_handle dlhandle;  /* Dynamic lib handle                              */
 } emodules_list;
 
-static Lisp_Object Vmodule_extensions;
-
 static int emodules_depth;
 static dll_handle dlhandle;
 static emodules_list *modules;
@@ -576,9 +578,14 @@
   modnum = 0;
 }
 
+#endif /* HAVE_SHLIB */
+
 void
 vars_of_module (void)
 {
+#ifdef HAVE_SHLIB
+  Fprovide (intern ("modules"));
+
   reinit_vars_of_module ();
 
   DEFVAR_LISP ("module-version", &Vmodule_version /*
@@ -603,6 +610,14 @@
 */);
   load_modules_quietly = 0;
 
+  DEFVAR_BOOL ("unloading-module", &unloading_module /*
+Used internally by `unload-feature'.  Do not set this variable.
+Danger, danger, Will Robinson!
+*/);
+  unloading_module = 0;
+
+#endif /* HAVE_SHLIB */
+
   DEFVAR_LISP ("module-load-path", &Vmodule_load_path /*
 *List of directories to search for dynamic modules to load.
 Each element is a string (directory name) or nil (try default directory).
@@ -625,12 +640,6 @@
 */);
   Vmodule_load_path = Qnil;
 
-  DEFVAR_BOOL ("unloading-module", &unloading_module /*
-Used internally by `unload-feature'.  Do not set this variable.
-Danger, danger, Will Robinson!
-*/);
-  unloading_module = 0;
-
   DEFVAR_LISP ("module-extensions", &Vmodule_extensions /*
 *List of filename extensions to use when searching for dynamic modules.
 */);
@@ -639,8 +648,4 @@
 			      build_string (".dll"),
 			      build_string (".dylib"),
 			      build_string (""));
-
-  Fprovide (intern ("modules"));
 }
-
-#endif /* HAVE_SHLIB */
Index: src/emodules.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emodules.h,v
retrieving revision 1.9
diff -d -u -r1.9 emodules.h
--- src/emodules.h	2003/08/28 15:44:28	1.9
+++ src/emodules.h	2003/10/15 03:01:04
@@ -46,9 +46,6 @@
 /* Module loading technology version number */
 extern Lisp_Object Vmodule_version;
 
-/* Load path */
-extern Lisp_Object Vmodule_load_path;
-
 /* XEmacs version Information */
 extern Lisp_Object Vemacs_major_version;
 extern Lisp_Object Vemacs_minor_version;
-- 
Jerry James
http://www.ittc.ku.edu/~james/