How can I remove the "Your vote was recorded." message in the polls? I need to delete the message "Your vote was recorded." when a user votes in a poll.  

I tried comment the line containing drupal_set_message(t('Your vote was recorded.')) in the Poll module, but if I do this, the Poll Enhancements module doesn't work well.

What other way has Drupal 7 for deleting specific messages?
The messages set with drupal_set_message() are saved in $_SESSION['messages'][$type] as an array of strings ($type can be "status", "warning", or "error"). The message you see, is set in poll_vote(), which is the form submission handler used for processing a vote, used from poll_view_voting(), the form builder for the vote form.

In order to remove the show string you should:


Implement hook_form_FORM_ID_alter() to add a form submission handler that is executed after poll_vote().
Implement the form submission handler to remove the string added from poll_vote().


Code similar to the following one should work.

function mymodule_form_poll_view_voting_alter(&amp;$form, &amp;$form_state) {
  $form['vote']['#submit'][] = 'mymodule_poll_view_submit';
}

function mymodule_poll_view_submit($form, &amp;$form_state) {
  if (isset($_SESSION['messages']['status']) &amp;&amp; is_array($_SESSION['messages']['status'])) {
    $messages = array_flip($_SESSION['messages']['status']);
    unset($messages[t('Your vote was recorded.')]);
    $_SESSION['messages']['status'] = $messages;
  }
}