How to handle the 'Save and edit' form action?
The way I do it is to add extra parameters, like:

$form['actions']['save']['#machine_name'] = 'save';
$form['actions']['save_edit']['#machine_name'] = 'save_edit';


Button position in $form found here.

Then in submit handler I can use:

switch($form_state['triggering_element']['#machine_name']) {
  case 'save_edit':
    // some code
  case 'save':
  default:
    // come other code
}


Alternative method:

Note that both buttons have submit handlers attached directly to them:

$form['actions']['save'] = array(
  '#type' =&gt; 'submit', 
  '#validate' =&gt; array('apachesolr_environment_edit_validate'), 
  '#submit' =&gt; array('apachesolr_environment_edit_submit'), 
  '#value' =&gt; t('Save'),
);
$form['actions']['save_edit'] = array(
  '#type' =&gt; 'submit', 
  '#validate' =&gt; array('apachesolr_environment_edit_validate'), 
  '#submit' =&gt; array('apachesolr_environment_edit_submit'), 
  '#value' =&gt; t('Save and edit'),
);


So, in your own code you can append submit functions separately. Assuming you wish to keep original ones executed, in your form alter use something like:

$form['actions']['save']['#submit'][] = 'x_environment_edit_save_submit';
$form['actions']['save_edit']['#submit'][] = 'x_environment_edit_save_edit_submit';


and of course create these functions.