diff --git modules/filter/filter.module modules/filter/filter.module
index 6179874..caa697b 100644
--- modules/filter/filter.module
+++ modules/filter/filter.module
@@ -306,7 +306,12 @@ function filter_format_disable($format) {
  * @see filter_format_load()
  */
 function filter_format_exists($format_id) {
-  return (bool) db_query_range('SELECT 1 FROM {filter_format} WHERE format = :format', 0, 1, array(':format' => $format_id))->fetchField();
+  $format_exists = (bool) db_query_range('SELECT 1 FROM {filter_format} WHERE format = :format', 0, 1, array(':format' => $format_id))->fetchField();
+  // Check if the text format is defined elsewhere
+  if (!$format_exists) {
+    drupal_alter('filter_format_exists', $format_exists, $format_id);
+  }
+  return $format_exists;
 }
 
 /**
@@ -415,6 +420,10 @@ function filter_formats($account = NULL) {
         ->execute()
         ->fetchAllAssoc('format');
 
+      // Allow modules to alter the list of formats; e.g., to load formats
+      // exported into code.
+      drupal_alter('filter_formats', $formats['all']);
+
       cache_set("filter_formats:{$language->language}", $formats['all']);
     }
   }
@@ -673,6 +682,10 @@ function filter_list_format($format_id) {
       foreach ($result as $record) {
         $filters['all'][$record->format][$record->name] = $record;
       }
+      // Allow modules to alter the filters of all formats; e.g., to complete
+      // formats exported into code.
+      drupal_alter('filter_list_format', $filters['all']);
+
       cache_set('filter_list_format', $filters['all']);
     }
   }
