What is the programmatic equivalent of block save?
The solution is to call drupal_form_submit.  For example:

module_load_include('inc', 'block', 'block.admin');
$form_state = array();
$form_state['values']['module'] = 'block';
$form_state['values']['op'] = 'Save block';
drupal_form_submit('block_admin_configure', $form_state, 'block', $delta);


You can apply this solution to other forms: from the browser, inspect the submit button, and get the 'op' value and the form's machine name.  In source, find the admin.inc that implements the form, and include that, and get the submit functions parameter signature; in this case, the 4th parameter is the form's delta value.