### Eclipse Workspace Patch 1.0
#P d7dev
Index: modules/field/field.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.api.php,v
retrieving revision 1.71
diff -u -r1.71 field.api.php
--- modules/field/field.api.php	6 Apr 2010 16:49:12 -0000	1.71
+++ modules/field/field.api.php	21 Apr 2010 05:34:33 -0000
@@ -1638,6 +1638,42 @@
 }
 
 /**
+ * Act on a field record being purged.
+ *
+ * In field_purge_field(), after the field configuration has been
+ * removed from the database, the field storage module has had a chance to
+ * run its hook_field_storage_purge_field(), and the field info cache
+ * has been cleared, this hook is invoked on all modules to allow them to
+ * respond to the field being purged.
+ *
+ * @param $field
+ *   The field being purged.
+ */
+function hook_field_purge_field($field) {
+  db_delete('my_module_field_info')
+    ->condition('id', $field['id'])
+    ->execute();
+}
+
+/**
+ * Act on a field instance being purged.
+ *
+ * In field_purge_instance(), after the field instance has been
+ * removed from the database, the field storage module has had a chance to
+ * run its hook_field_storage_purge_instance(), and the field info cache
+ * has been cleared, this hook is invoked on all modules to allow them to
+ * respond to the field instance being purged.
+ *
+ * @param $instance
+ *   The instance being purged.
+ */
+function hook_field_purge_field($instance) {
+  db_delete('my_module_field_instance_info')
+    ->condition('id', $instance['id'])
+    ->execute();
+}
+
+/**
  * @} End of "ingroup field_crud"
  */
 
Index: modules/system/system.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v
retrieving revision 1.153
diff -u -r1.153 system.api.php
--- modules/system/system.api.php	20 Apr 2010 18:48:05 -0000	1.153
+++ modules/system/system.api.php	21 Apr 2010 05:34:33 -0000
@@ -32,6 +32,8 @@
  *     exists, and automatically load it when required.
  *
  * See system_hook_info() for all hook groups defined by Drupal core.
+ *
+ * @see hook_hook_info_alter().
  */
 function hook_hook_info() {
   $hooks['token_info'] = array(
@@ -44,6 +46,21 @@
 }
 
 /**
+ * Alter information from hook_hook_info().
+ *
+ * @param $hooks
+ *   Information gathered by module_hook_info() from other modules'
+ *   implementations of hook_hook_info(). Alter this array directly.
+ *   See hook_hook_info() for information on what this may contain.
+ */
+function hook_hook_info_alter(&$hooks) {
+  // Our module wants to completely override the core tokens, so make
+  // sure the core token hooks are not found.
+  $hooks['token_info']['group'] = 'mytokens';
+  $hooks['tokens']['group'] = 'mytokens';
+}
+
+/**
  * Inform the base system and the Field API about one or more entity types.
  *
  * Inform the system about one or more entity types (i.e., object types that
