Drupal 7 block api, is this custom module correct?
Very nearly, but not quite.


You're missing the function arguments in your hook implementation, so there's nothing there to actually alter.
The blocks array is keyed by module, then block delta, so you would need to access the block using those instead of the title as you currently are.
You're trying to overwrite the system main block in it's entirety rather than changing a property on it.
You've spelt function wrong ;)


Try:

function MYMODULE_block_info_alter(&amp;$blocks, $theme, $code_blocks) {
  $blocks['system']['main']['weight'] = -9999;
}