Index: wp-includes/canonical.php
===================================================================
--- wp-includes/canonical.php	(revision 9339)
+++ wp-includes/canonical.php	(working copy)
@@ -249,20 +249,20 @@
 	if ( $compare_original !== $compare_redirect ) {
 		$redirect_url = $redirect['scheme'] . '://' . $redirect['host'];
 		if ( !empty($redirect['port']) )
-		 	$redirect_url .= ':' . $redirect['port'];
+			$redirect_url .= ':' . $redirect['port'];
 		$redirect_url .= $redirect['path'];
 		if ( !empty($redirect['query']) )
 			$redirect_url .= '?' . $redirect['query'];
 	}
 
 	if ( !$redirect_url || $redirect_url == $requested_url )
-	 	return false;
+		return false;
 
 	// Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning FALSE
 	$redirect_url = apply_filters('redirect_canonical', $redirect_url, $requested_url);
 
 	if ( !$redirect_url || $redirect_url == $requested_url ) // yes, again -- in case the filter aborted the request
-	 	return false;
+		return false;
 
 	if ( $do_redirect ) {
 		// protect against chained redirects
Index: wp-includes/comment-template.php
===================================================================
--- wp-includes/comment-template.php	(revision 9339)
+++ wp-includes/comment-template.php	(working copy)
@@ -412,7 +412,11 @@
  */
 function get_comment_link($comment = null) {
 	$comment = get_comment($comment);
-	return get_permalink( $comment->comment_post_ID ) . '#comment-' . $comment->comment_ID;
+
+	if ( get_option('page_comments') )
+		return add_query_arg( 'gotocom', $comment->comment_ID, get_permalink( $comment->comment_post_ID ) );
+	else
+		return get_permalink( $comment->comment_post_ID ) . '#comment-' . $comment->comment_ID;
 }
 
 /**
@@ -1085,7 +1089,7 @@
 		<br />
 <?php endif; ?>
 
-		<div class="comment-meta commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php printf(__('%1$s at %2$s'), get_comment_date('F jS, Y'),  get_comment_time()) ?></a><?php edit_comment_link('edit','&nbsp;&nbsp;','') ?></div>
+		<div class="comment-meta commentmetadata"><a rel="nofollow" href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date('F jS, Y'),  get_comment_time()) ?></a><?php edit_comment_link('edit','&nbsp;&nbsp;','') ?></div>
 
 		<?php echo apply_filters('comment_text', get_comment_text()) ?>
 
Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 9339)
+++ wp-includes/comment.php	(working copy)
@@ -520,6 +520,55 @@
 }
 
 /**
+ * Calculate what page number a comment will appear on for comment paging.
+ *
+ * @since 2.7.0
+ *
+ * @param int $comment_ID Comment ID.
+ * @param int $per_page Optional comments per page.
+ * @return int|null Comment page number or null on error.
+ */
+function get_page_of_comment( $comment_ID, $per_page = null, $threaded = null ) {
+	if ( !$comment = get_comment( $comment_ID ) )
+		return;
+
+	if ( !get_option('page_comments') )
+		return 1;
+
+	$comments = array_reverse( get_comments( $comment->comment_post_ID ) );
+
+	if ( null === $per_page )
+		$per_page = get_option('comments_per_page');
+
+	if ( null === $threaded )
+		$threaded = get_option('thread_comments');
+
+	// Find this comment's top level parent
+	if ( $threaded ) {
+		while ( 0 != $comment->comment_parent )
+			$comment = get_comment( $comment->comment_parent );
+	}
+
+	// Start going through the comments until we find what page number the above top level comment is on
+	$page = 1;
+	$comthispage = 0;
+	foreach ( $comments as $com ) {
+		if ( $threaded && 0 != $com->comment_parent )
+			continue;
+
+		if ( $com->comment_ID == $comment->comment_ID )
+			return $page;
+
+		$comthispage++;
+
+		if ( $comthispage >= $per_page ) {
+			$page++;
+			$comthispage = 0;
+		}
+	}
+}
+
+/**
  * Does comment contain blacklisted characters or words.
  *
  * @since 1.5.0
