Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.435
diff -u -p -r1.435 block.module
--- modules/block/block.module	23 Nov 2010 16:12:15 -0000	1.435
+++ modules/block/block.module	13 Jan 2011 04:35:39 -0000
@@ -944,7 +944,15 @@ function template_preprocess_block(&$var
 
   $variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->region;
   $variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module;
-  $variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module . '__' . $variables['block']->delta;
+  // Hyphens and underscores play a special role in theme suggestions.
+  // Basically, theme suggestions should only contain underscores, because
+  // within drupal_find_theme_templates(), underscores are converted to hyphens
+  // to match template file names, and then converted back to hyphens to match
+  // pre-processing and other function names. So if your theme suggestion
+  // contains a hyphen, it will end up as an underscore after this conversion,
+  // and your function names won't be recognized. So, we need to convert
+  // hyphens to underscores in block deltas for the theme suggestions.
+  $variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module . '__' . str_replace('-', '_', $variables['block']->delta);
 
   // Create a valid HTML ID and make sure it is unique.
   $variables['block_html_id'] = drupal_html_id('block-' . $variables['block']->module . '-' . $variables['block']->delta);