Index: modules/search/search.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.api.php,v
retrieving revision 1.11
diff -u -r1.11 search.api.php
--- modules/search/search.api.php	22 Jun 2009 09:10:06 -0000	1.11
+++ modules/search/search.api.php	13 Jul 2009 16:06:57 -0000
@@ -25,6 +25,9 @@
  * using a key:value syntax. This allows all search queries to have a clean
  * and permanent URL. See node_form_search_form_alter() for an example.
  *
+ * You can also alter the display of your module's search results
+ * by implementing hook_search_page().
+ *
  * The example given here is for node.module, which uses the indexed search
  * capabilities. To do this, node module also implements hook_update_index()
  * which is used to create and maintain the index.
@@ -197,6 +200,32 @@
   }
 }
 
+/** 
+ * Override the rendering of search results.
+ *
+ * A module that implements hook_search() to define a type of search
+ * may implement this hook in order to override the default theming of
+ * its search results, which is otherwise themed using
+ * theme('search_results').
+ *
+ * @param $results
+ *   An array of results.
+ * @return
+ *   An HTML string containing the formatted search results, with
+ *   a pager included.
+ */
+function hook_search_page($results) {
+  $output = '<dl class="search-results">';
+
+  foreach ($results as $entry) {
+    $output .= theme('search_result', $entry, $type);
+  }
+  $output .= '</dl>';
+  $output .= theme('pager', NULL);
+
+  return $output;
+}
+
 /**
  * Preprocess text for the search index.
  *
