--- C:/projects/d7/includes/form.inc	Mon Sep 29 15:09:55 2008
+++ C:/projects/d7/includes/form.new.inc	Mon Sep 29 17:39:52 2008
@@ -779,11 +779,15 @@
  *   The error message to present to the user.
  * @param $reset
  *   Reset the form errors static cache.
+ * @param $module
+ *   (optional) The module sending the message.
+ * @param $form_id
+ *   (optional) The id of the form.
  * @return
  *   Never use the return value of this function, use form_get_errors and
  *   form_get_error instead.
  */
-function form_set_error($name = NULL, $message = '', $reset = FALSE) {
+function form_set_error($name = NULL, $message = '', $reset = FALSE, $module = NULL, $form_id = NULL) {
   static $form = array();
   if ($reset) {
     $form = array();
@@ -791,7 +795,7 @@
   if (isset($name) && !isset($form[$name])) {
     $form[$name] = $message;
     if ($message) {
-      drupal_set_message($message, 'error');
+      drupal_set_message($message, 'error', TRUE, $module, $form_id);
     }
   }
   return $form;
