Index: wp-comments-post.php
===================================================================
--- wp-comments-post.php	(revision 18391)
+++ wp-comments-post.php	(working copy)
@@ -91,10 +91,7 @@
 
 $comment = get_comment($comment_id);
 if ( !$user->ID ) {
-	$comment_cookie_lifetime = apply_filters('comment_cookie_lifetime', 30000000);
-	setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
-	setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
-	setcookie('comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
+	wp_set_comment_cookie($comment->comment_author,$comment->comment_author_email,$comment->comment_author_url);	
 }
 
 $location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id;
Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php	(revision 18391)
+++ wp-includes/pluggable.php	(working copy)
@@ -1809,3 +1809,23 @@
 	return $r;
 }
 endif;
+
+if ( !function_exists('wp_set_comment_cookie') ) :
+/**
+ * Sets the cookies used to store an unauthenticated commentator's identity. Typically used
+ * to recall previous comments by this commentator that are still held in moderation.
+ *
+ * @param string $author Comment author's name
+ * @param string $email Comment author's e-mail address
+ * @param string $url Comment author's URL (typically optional)
+ *
+ * @uses apply_filters() Calls 'comment_cookie_lifetime' to adjust lifetime of these cookies
+ *
+ */
+function wp_set_comment_cookie($author,$email,$url) {
+        $comment_cookie_lifetime = apply_filters('comment_cookie_lifetime', 30000000);
+        setcookie('comment_author_' . COOKIEHASH, $author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
+        setcookie('comment_author_email_' . COOKIEHASH, $email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
+        setcookie('comment_author_url_' . COOKIEHASH, esc_url($url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
+}
+endif;
