Does node_delete() delete node_revision and comment as well? I want to delete the node_revisions and comments with node_delete().
Is this possible, or do I need to write custom code?
Little more context on this one since I had to answer this myself recently. The node.module code starts the delete operation by invoking all HOOK_node_delete functions it is aware of:

  foreach ($nodes as $nid =&gt; $node) {
    // 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.
    // This code is implemented in node module rather than in search module,
    // because node module is implementing search module's API, not the other
    // way around.
    if (module_exists('search')) {
      search_reindex($nid, 'node');
    }
  }


One of which is the comment_node_delete() function in comment.module (clearing comments):

/**
 * Implements hook_node_delete().
 */
function comment_node_delete($node) {
  $cids = db_query('SELECT cid FROM {comment} WHERE nid = :nid', array(':nid' =&gt; $node-&gt;nid))-&gt;fetchCol();
  comment_delete_multiple($cids);
  db_delete('node_comment_statistics')
    -&gt;condition('nid', $node-&gt;nid)
    -&gt;execute();
}


After it has finished with the modules that have references to these nodes, it then clears its own node tables for the NID: 

  // Delete after calling hooks so that they can query node tables as needed.
  db_delete('node')
    -&gt;condition('nid', $nids, 'IN')
    -&gt;execute();
  db_delete('node_revision')
    -&gt;condition('nid', $nids, 'IN')
    -&gt;execute();
  db_delete('history')
    -&gt;condition('nid', $nids, 'IN')
    -&gt;execute();
  db_delete('node_access')
   -&gt;condition('nid', $nids, 'IN')
   -&gt;execute();


So - yes, node_delete clears both comments and revisions, as well as other node data and references.