Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.229
diff -u -p -r1.229 file.inc
--- includes/file.inc	11 Sep 2010 21:14:31 -0000	1.229
+++ includes/file.inc	17 Sep 2010 13:33:10 -0000
@@ -1189,6 +1189,7 @@ function file_delete(stdClass $file, $fo
 
   // Let other modules clean up any references to the deleted file.
   module_invoke_all('file_delete', $file);
+  module_invoke_all('entity_delete', $file, 'file');
 
   // Make sure the file is deleted before removing its row from the
   // database, so UIs can still find the file in the database.
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.898
diff -u -p -r1.898 comment.module
--- modules/comment/comment.module	13 Sep 2010 05:52:18 -0000	1.898
+++ modules/comment/comment.module	17 Sep 2010 13:33:11 -0000
@@ -1576,6 +1576,7 @@ function comment_delete_multiple($cids) 
     foreach ($comments as $comment) {
       field_attach_delete('comment', $comment);
       module_invoke_all('comment_delete', $comment);
+      module_invoke_all('entity_delete', $comment, 'comment');
 
       // Delete the comment's replies.
       $child_cids = db_query('SELECT cid FROM {comment} WHERE pid = :cid', array(':cid' => $comment->cid))->fetchCol();
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1298
diff -u -p -r1.1298 node.module
--- modules/node/node.module	11 Sep 2010 06:03:11 -0000	1.1298
+++ modules/node/node.module	17 Sep 2010 13:33:14 -0000
@@ -1152,6 +1152,7 @@ function node_delete_multiple($nids) {
       // Call the node-specific callback (if any):
       node_invoke($node, 'delete');
       module_invoke_all('node_delete', $node);
+      module_invoke_all('entity_delete', $node, 'node');
       field_attach_delete('node', $node);
 
       // Remove this node from the search index if needed.
Index: modules/system/system.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v
retrieving revision 1.193
diff -u -p -r1.193 system.api.php
--- modules/system/system.api.php	11 Sep 2010 14:35:13 -0000	1.193
+++ modules/system/system.api.php	17 Sep 2010 13:33:17 -0000
@@ -298,6 +298,17 @@ function hook_entity_update($entity, $ty
 }
 
 /**
+ * Act on entities when deleted.
+ *
+ * @param $entity
+ *   The entity object.
+ * @param $type
+ *   The type of entity being deleted (i.e. node, user, comment).
+ */
+function hook_entity_delete($entity, $type) {
+}
+
+/**
  * Alter or execute an EntityFieldQuery.
  *
  * @param EntityFieldQuery $query
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.605
diff -u -p -r1.605 taxonomy.module
--- modules/taxonomy/taxonomy.module	11 Sep 2010 06:03:12 -0000	1.605
+++ modules/taxonomy/taxonomy.module	17 Sep 2010 13:33:17 -0000
@@ -426,7 +426,8 @@ function taxonomy_vocabulary_delete($vid
     ->execute();
 
   field_attach_delete_bundle('taxonomy_term', $vocabulary['machine_name']);
-  module_invoke_all('taxonomy', 'delete', 'vocabulary', $vocabulary);
+  module_invoke_all('taxonomy_vocabulary_delete', $vocabulary);
+  module_invoke_all('entity_delete', $vocabulary, 'taxonomy_vocabulary');
 
   cache_clear_all();
   entity_get_controller('taxonomy_vocabulary')->resetCache();
@@ -582,6 +583,7 @@ function taxonomy_term_delete($tid) {
 
         field_attach_delete('taxonomy_term', $term);
         module_invoke_all('taxonomy_term_delete', $term);
+        module_invoke_all('entity_delete', $term, 'taxonomy_term');
         taxonomy_terms_static_reset();
       }
     }
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1200
diff -u -p -r1.1200 user.module
--- modules/user/user.module	11 Sep 2010 06:03:12 -0000	1.1200
+++ modules/user/user.module	17 Sep 2010 13:33:20 -0000
@@ -2341,6 +2341,7 @@ function user_delete_multiple(array $uid
 
     foreach ($accounts as $uid => $account) {
       module_invoke_all('user_delete', $account);
+      module_invoke_all('entity_delete', $account, 'user');
       field_attach_delete('user', $account);
       drupal_session_destroy_uid($account->uid);
     }
