? module_implements_alter.patch
Index: includes/module.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/module.inc,v
retrieving revision 1.179
diff -u -p -r1.179 module.inc
--- includes/module.inc	13 Jan 2010 05:08:29 -0000	1.179
+++ includes/module.inc	22 Jan 2010 21:48:25 -0000
@@ -578,6 +578,8 @@ function module_implements($hook, $sort 
         $implementations['#write_cache'] = TRUE;
       }
     }
+    // Allow modules to change the weight of specific implementations.
+    drupal_alter('module_implements', $implementations[$hook], $hook);
   }
   else {
     foreach ($implementations[$hook] as $module => $group) {
Index: modules/system/system.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v
retrieving revision 1.120
diff -u -p -r1.120 system.api.php
--- modules/system/system.api.php	13 Jan 2010 06:26:49 -0000	1.120
+++ modules/system/system.api.php	22 Jan 2010 21:48:26 -0000
@@ -944,6 +944,28 @@ function hook_mail_alter(&$message) {
 }
 
 /**
+ *  Alter the registry of modules implementing a hook.
+ *
+ *  This hook is invoked during module_implements(). A module may implement
+ *  this hook in order to reorder the implementing modules, which are otherwise
+ *  ordered by the module's system weight.
+ *
+ *  @param &$implementations
+ *    An array keyed by the module's name. The value of each item corresponds
+ *    to a $group, which is usually FALSE, unless the implementation is in a
+ *    file named $module.$group.inc.
+ *  @param $hook
+ *    The name of the module hook being implemented.
+ */
+function hook_module_implements_alter(&$implementations, $hook) {
+  if ($hook == 'rdf_mapping') {
+    // Move my_module_rdf_mapping() to the end of the list.
+    unset($implementations['my_module']);
+    $implementations['my_module'] = FALSE;
+  }
+}
+
+/**
  * Alter the information parsed from module and theme .info files
  *
  * This hook is invoked in _system_rebuild_module_data() and in
