diff --git a/core/includes/pager.inc b/core/includes/pager.inc
index 4c497ba..073e22c 100644
--- a/core/includes/pager.inc
+++ b/core/includes/pager.inc
@@ -142,30 +142,45 @@ function pager_get_query_parameters() {
 }
 
 /**
- * Returns HTML for a query pager.
- *
- * Menu callbacks that display paged query results should call theme('pager') to
- * retrieve a pager control so that users can view other results. Format a list
- * of nearby pages with additional query results.
- *
- * @param $variables
- *   An associative array containing:
- *   - tags: An array of labels for the controls in the pager.
- *   - element: An optional integer to distinguish between multiple pagers on
- *     one page.
- *   - parameters: An associative array of query string parameters to append to
- *     the pager links.
- *   - quantity: The number of pages in the list.
+ * Preprocess variables for theme_pager().
  *
- * @ingroup themeable
+ * Prepares the values passed to the theme_pager function to be passed into a
+ * pluggable template engine.
  */
-function theme_pager($variables) {
-  $tags = $variables['tags'];
-  $element = $variables['element'];
-  $parameters = $variables['parameters'];
-  $quantity = $variables['quantity'];
+function template_preprocess_pager(&$variables) {
   global $pager_page_array, $pager_total;
 
+  // Declare the actual/effective theme variables.
+  $variables['first'] = NULL;
+  $variables['previous'] = NULL;
+  $variables['next'] = NULL;
+  $variables['last'] = NULL;
+
+  $variables['less'] = FALSE;
+  $variables['more'] = FALSE;
+  $variables['items'] = array();
+  $variables['current_item'] = NULL;
+  $variables['current_index'] = NULL;
+
+  // Nothing to do if there is only one page.
+  $element = &$variables['element'];
+  if ($pager_total[$element] <= 1) {
+    return;
+  }
+
+  // Fill in default link labels.
+  $tags = &$variables['tags'];
+  $tags += array(
+    t('« first'),
+    t('‹ previous'),
+    '',
+    t('next ›'),
+    t('last »'),
+  );
+
+  $parameters = &$variables['parameters'];
+  $quantity = &$variables['quantity'];
+
   // Calculate various markers within this pager piece:
   // Middle is used to "center" pages around the current page.
   $pager_middle = ceil($quantity / 2);
@@ -177,7 +192,6 @@ function theme_pager($variables) {
   $pager_last = $pager_current + $quantity - $pager_middle;
   // max is the maximum page number
   $pager_max = $pager_total[$element];
-  // End of marker calculations.
 
   // Prepare for generation loop.
   $i = $pager_first;
@@ -191,193 +205,246 @@ function theme_pager($variables) {
     $pager_last = $pager_last + (1 - $i);
     $i = 1;
   }
-  // End of generation loop preparation.
 
-  $li_first = '';
-  $li_previous = '';
-  $li_next = '';
-  $li_last = '';
+  // Second sanity check: If there is only one page, nothing to do.
+  if ($i == $pager_max) {
+    return;
+  }
+  $current_path = current_path();
 
   // Create the "first" and "previous" links if we are not on the first page.
   if ($pager_page_array[$element] > 0) {
-    $li_first = theme('pager_link__first', array(
-      'text' => (isset($tags[0]) ? $tags[0] : t('« first')),
-      'page_new' => pager_load_array(0, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'first'),
-    ));
-    $li_previous = theme('pager_link__previous', array(
-      'text' => isset($tags[1]) ? $tags[1] : t('‹ previous'),
-      'page_new' => pager_load_array($pager_page_array[$element] - 1, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'prev'),
-    ));
+    $variables['first'] = array(
+      '#theme' => 'link__pager__first',
+      '#text' => $tags[0],
+      '#path' => $current_path,
+      '#element' => $element,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, 0),
+        'attributes' => array(
+          'title' => t('Go to first page'),
+          'rel' => 'first',
+        ),
+      ),
+      '#wrapper_attributes' =>  array('class' => array('pager-first')),
+    );
+    $variables['previous'] = array(
+      '#theme' => 'link__pager__previous',
+      '#text' => $tags[1],
+      '#path' => $current_path,
+      '#element' => $element,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] - 1),
+        'attributes' => array(
+          'title' => t('Go to previous page'),
+          'rel' => 'prev',
+        ),
+      ),
+      '#wrapper_attributes' => array('class' => array('pager-previous')),
+    );
   }
 
   // Create the "last" and "next" links if we are not on the last page.
   if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {
-    $li_next = theme('pager_link__next', array(
-      'text' => isset($tags[3]) ? $tags[3] : t('next ›'),
-      'page_new' => pager_load_array($pager_page_array[$element] + 1, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'next'),
-    ));
-    $li_last = theme('pager_link__last', array(
-      'text' => (isset($tags[4]) ? $tags[4] : t('last »')),
-      'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'last'),
-    ));
+    $variables['next'] = array(
+      '#theme' => 'link__pager__next',
+      '#text' => $tags[3],
+      '#path' => $current_path,
+      '#element' => $element,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] + 1),
+        'attributes' => array(
+          'title' => t('Go to next page'),
+          'rel' => 'next',
+        ),
+      ),
+      '#wrapper_attributes' => array('class' => array('pager-next')),
+    );
+    $variables['last'] = array(
+      '#theme' => 'link__pager__last',
+      '#text' => $tags[4],
+      '#path' => $current_path,
+      '#element' => $element,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, $pager_total[$element] - 1),
+        'attributes' => array(
+          'title' => t('Go to last page'),
+          'rel' => 'last',
+        ),
+      ),
+      '#wrapper_attributes' => array('class' => array('pager-last')),
+    );
   }
 
-  if ($pager_total[$element] > 1) {
-    if ($li_first) {
-      $items[] = array(
-        '#wrapper_attributes' => array('class' => array('pager-first')),
-        '#markup' => $li_first,
-      );
-    }
-    if ($li_previous) {
-      $items[] = array(
-        '#wrapper_attributes' => array('class' => array('pager-previous')),
-        '#markup' => $li_previous,
+  // Check whether there are further previous pages.
+  if ($i > 1) {
+    $variables['less'] = array(
+      '#markup' => '…',
+      '#wrapper_attributes' => array('class' => array('pager-ellipsis')),
+    );
+  }
+  // Generate the actual pager items.
+  for (; $i <= $pager_last && $i <= $pager_max; $i++) {
+    if ($i < $pager_current) {
+      $variables['items'][$i] = array(
+        '#theme' => 'link__pager',
+        '#text' => $i,
+        '#path' => $current_path,
+        '#options' => array(
+          'query' => pager_query_add_page($parameters, $element, $i - 1),
+          'attributes' => array(
+            'title' => t('Go to page @number', array('@number' => $i)),
+          ),
+        ),
+        '#element' => $element,
+        // Specify how many pages are between this item and the current page.
+        // Ignored by default, supplied for alternative implementations.
+        '#interval' => ($pager_current - $i),
+        '#wrapper_attributes' => array('class' => array('pager-item')),
       );
     }
-
-    // When there is more than one page, create the pager list.
-    if ($i != $pager_max) {
-      if ($i > 1) {
-        $items[] = array(
-          '#wrapper_attributes' => array('class' => array('pager-ellipsis')),
-          '#markup' => '…',
-        );
-      }
-      // Now generate the actual pager piece.
-      for (; $i <= $pager_last && $i <= $pager_max; $i++) {
-        if ($i < $pager_current) {
-          $items[] = array(
-            '#wrapper_attributes' => array('class' => array('pager-item')),
-            '#markup' => theme('pager_link', array(
-              'text' => $i,
-              'page_new' => pager_load_array($i - 1, $element, $pager_page_array),
-              'element' => $element,
-              'interval' => ($pager_current - $i),
-              'parameters' => $parameters,
-            )),
-          );
-        }
-        if ($i == $pager_current) {
-          $items[] = array(
-            '#wrapper_attributes' => array('class' => array('pager-current')),
-            '#markup' => $i,
-          );
-        }
-        if ($i > $pager_current) {
-          $items[] = array(
-            '#wrapper_attributes' => array('class' => array('pager-item')),
-            '#markup' => theme('pager_link', array(
-              'text' => $i,
-              'page_new' => pager_load_array($i - 1, $element, $pager_page_array),
-              'element' => $element,
-              'interval' => ($i - $pager_current),
-              'parameters' => $parameters,
-            )),
-          );
-        }
-      }
-      if ($i < $pager_max) {
-        $items[] = array(
-          '#wrapper_attributes' => array('class' => array('pager-ellipsis')),
-          '#markup' => '…',
-        );
-      }
-    }
-    // End generation.
-    if ($li_next) {
-      $items[] = array(
-        '#wrapper_attributes' => array('class' => array('pager-next')),
-        '#markup' => $li_next,
+    if ($i == $pager_current) {
+      $variables['items'][$i] = array(
+        '#wrapper_attributes' => array('class' => array('pager-current')),
+        '#markup' => $i,
       );
+      $variables['current_item'] = &$variables['items'][$i];
+      $variables['current_index'] = $i;
     }
-    if ($li_last) {
-      $items[] = array(
-        '#wrapper_attributes' => array('class' => array('pager-last')),
-        '#markup' => $li_last,
+    if ($i > $pager_current) {
+      $variables['items'][$i] = array(
+        '#theme' => 'link__pager',
+        '#text' => $i,
+        '#path' => $current_path,
+        '#options' => array(
+          'query' => pager_query_add_page($parameters, $element, $i - 1),
+          'attributes' => array(
+            'title' => t('Go to page @number', array('@number' => $i)),
+          ),
+        ),
+        '#element' => $element,
+        // Specify how many pages are between this item and the current page.
+        // Ignored by default, supplied for alternative implementations.
+        '#interval' => ($i - $pager_current),
+        '#wrapper_attributes' => array('class' => array('pager-item')),
       );
     }
-    return '<h2 class="element-invisible">' . t('Pages') . '</h2>' . theme('item_list', array(
-      'items' => $items,
-      'attributes' => array('class' => array('pager')),
-    ));
+  }
+  // Check whether there are further next pages.
+  if ($i < $pager_max) {
+    $variables['more'] = array(
+      '#markup' => '…',
+      '#wrapper_attributes' => array('class' => array('pager-ellipsis')),
+    );
   }
 }
 
 /**
- * Returns HTML for a link to a specific query result page.
+ * Returns HTML for a query pager.
+ *
+ * Menu callbacks that display paged query results should call theme('pager') to
+ * retrieve a pager control so that users can view other results. Format a list
+ * of nearby pages with additional query results.
  *
  * @param $variables
  *   An associative array containing:
- *   - text: The link text. Also used to figure out the title attribute of the
- *     link, if it is not provided in $variables['attributes']['title']; in
- *     this case, $variables['text'] must be one of the standard pager link
- *     text strings that would be generated by the pager theme functions, such
- *     as a number or t('« first').
- *   - page_new: The first result to display on the linked page.
+ *   - first: A render array for the "first" link. NULL if there is none.
+ *   - previous: A render array for the "previous" link. NULL if there is none.
+ *   - next: A render array for the "next" link. NULL if there is none.
+ *   - last: A render array for the "last" link. NULL if there is none.
+ *   - less: An ellipsis if there are further previous pages not contained in
+ *     the pager items, or FALSE if there are no further pages.
+ *   - more: An ellipsis if there are further next pages not contained in the
+ *     pager items, or FALSE if there are no further pages.
+ *   - items: An indexed array that contains render arrays for the actual page
+ *     links.
+ *   - current_item: A reference to the render array value in 'items' for the
+ *     current page. Contains the bare page number by default. Change this to
+ *     adjust the output for the item pointing to the current page.
+ *   - current_index: The index of the current page in 'items'. I.e., use
+ *     $variables['items'][$variables['current_index']] to access the item
+ *     pointing to the current page (which yields the same as 'current_item').
+ *   Additionally, the variables that were originally passed to theme('pager')
+ *   by a module:
+ *   - tags: An array of labels for the controls in the pager.
  *   - element: An optional integer to distinguish between multiple pagers on
  *     one page.
  *   - parameters: An associative array of query string parameters to append to
- *     the pager link.
- *   - attributes: An associative array of HTML attributes to apply to the
- *     pager link.
- *
- * @see theme_pager()
+ *     all pager links.
+ *   - quantity: The number of pages in the list.
  *
  * @ingroup themeable
  */
-function theme_pager_link($variables) {
-  $text = $variables['text'];
-  $page_new = $variables['page_new'];
-  $element = $variables['element'];
-  $parameters = $variables['parameters'];
-  $attributes = $variables['attributes'];
+function theme_pager($variables) {
+  // If there are no pages, ensure nothing is output.
+  if (!$variables['items']) {
+    return '';
+  }
+  $items = array();
 
-  $page = isset($_GET['page']) ? $_GET['page'] : '';
-  if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) {
-    $parameters['page'] = $new_page;
+  // First and previous links.
+  if ($variables['first']) {
+    $items[] = $variables['first'];
+  }
+  if ($variables['previous']) {
+    $items[] = $variables['previous'];
   }
 
-  $query = array();
-  if (count($parameters)) {
-    $query = drupal_get_query_parameters($parameters, array());
+  // Page links.
+  if ($variables['less']) {
+    $items[] = $variables['less'];
   }
-  if ($query_pager = pager_get_query_parameters()) {
-    $query = array_merge($query, $query_pager);
+  foreach ($variables['items'] as $index => $item) {
+    $items[] = $item;
   }
 
-  // Set each pager link title
-  if (!isset($attributes['title'])) {
-    static $titles = NULL;
-    if (!isset($titles)) {
-      $titles = array(
-        t('« first') => t('Go to first page'),
-        t('‹ previous') => t('Go to previous page'),
-        t('next ›') => t('Go to next page'),
-        t('last »') => t('Go to last page'),
-      );
-    }
-    if (isset($titles[$text])) {
-      $attributes['title'] = $titles[$text];
-    }
-    elseif (is_numeric($text)) {
-      $attributes['title'] = t('Go to page @number', array('@number' => $text));
-    }
+  // Next and last links.
+  if ($variables['next']) {
+    $items[] = $variables['next'];
+  }
+  if ($variables['last']) {
+    $items[] = $variables['last'];
   }
 
-  return l($text, current_path(), array('query' => $query, 'attributes' => $attributes));
+  $output = '<h2 class="element-invisible">' . t('Pages') . '</h2>';
+  $output .= theme('item_list__pager', array(
+    'items' => $items,
+    'attributes' => array('class' => array('pager')),
+  ));
+  return $output;
+}
+
+/**
+ * Adds the 'page' parameter to the query parameter array of a pager link.
+ *
+ * @param array $query
+ *   An associative array of query parameters to add to.
+ * @param integer $element
+ *   An integer to distinguish between multiple pagers on one page.
+ * @param integer $index
+ *   The index of the target page in the pager array.
+ *
+ * @return array
+ *   The altered $query parameter array.
+ *
+ * @todo Document the pager/element/index architecture and logic. It is not
+ *   clear what is happening in this function as well as pager_load_array(),
+ *   and whether this can be simplified in any way.
+ */
+function pager_query_add_page(array $query, $element, $index) {
+  global $pager_page_array;
+
+  // Determine the first result to display on the linked page.
+  $page_new = pager_load_array($index, $element, $pager_page_array);
+
+  $page = isset($_GET['page']) ? $_GET['page'] : '';
+  if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) {
+    $query['page'] = $new_page;
+  }
+  if ($query_pager = pager_get_query_parameters()) {
+    $query = array_merge($query, $query_pager);
+  }
+  return $query;
 }
 
 /**
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 85ca1fa..6d8e582 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -3282,21 +3282,6 @@ function drupal_common_theme() {
     'pager' => array(
       'variables' => array('tags' => array(), 'element' => 0, 'parameters' => array(), 'quantity' => 9),
     ),
-    'pager_first' => array(
-      'variables' => array('text' => NULL, 'element' => 0, 'parameters' => array()),
-    ),
-    'pager_previous' => array(
-      'variables' => array('text' => NULL, 'element' => 0, 'interval' => 1, 'parameters' => array()),
-    ),
-    'pager_next' => array(
-      'variables' => array('text' => NULL, 'element' => 0, 'interval' => 1, 'parameters' => array()),
-    ),
-    'pager_last' => array(
-      'variables' => array('text' => NULL, 'element' => 0, 'parameters' => array()),
-    ),
-    'pager_link' => array(
-      'variables' => array('text' => NULL, 'page_new' => NULL, 'element' => NULL, 'parameters' => array(), 'attributes' => array()),
-    ),
     // From menu.inc.
     'menu_link' => array(
       'render element' => 'element',
diff --git a/core/modules/search/search.pages.inc b/core/modules/search/search.pages.inc
index eaae71a..e90ba01 100644
--- a/core/modules/search/search.pages.inc
+++ b/core/modules/search/search.pages.inc
@@ -94,10 +94,7 @@ function template_preprocess_search_results(&$variables) {
       '#module' => $variables['module'],
     );
   }
-  $variables['pager'] = array(
-    '#theme' => 'pager',
-    '#tags' => NULL,
-  );
+  $variables['pager'] = array('#theme' => 'pager');
   // @todo Revisit where this help text is added, see also
   //   http://drupal.org/node/1918856.
   $variables['help'] = search_help('search#noresults', drupal_help_arg());
diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc
index 49986ba..3294b06 100644
--- a/core/modules/user/user.admin.inc
+++ b/core/modules/user/user.admin.inc
@@ -254,7 +254,7 @@ function user_admin_account() {
     '#options' => $options,
     '#empty' => t('No people available.'),
   );
-  $form['pager'] = array('#markup' => theme('pager'));
+  $form['pager'] = array('#theme' => 'pager');
 
   return $form;
 }
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index e987ffd..00c7a7c 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -1033,31 +1033,37 @@ function theme_views_mini_pager($vars) {
 
   // Current is the page we are currently paged to.
   $pager_current = $pager_page_array[$element] + 1;
-  // End of marker calculations.
+  $current_path = current_path();
 
   $li_previous = array();
   if ($pager_total[$element] > 1 && $pager_page_array[$element] > 0) {
     $li_previous = array(
-      '#theme' => 'pager_link__previous',
+      '#theme' => 'link__pager__previous',
       '#text' => (isset($tags[1]) ? $tags[1] : t('‹‹')),
-      '#attributes' => array('title' => t('Go to previous page')),
-      '#page_new' => pager_load_array($pager_page_array[$element] - 1, $element, $pager_page_array),
-      '#element' => $element,
-      '#interval' => 1,
-      '#parameters' => $parameters,
+      '#path' => $current_path,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] - 1),
+        'attributes' => array(
+          'title' => t('Go to previous page'),
+          'rel' => 'prev',
+        ),
+      ),
     );
   }
 
   $li_next = array();
   if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {
     $li_next = array(
-      '#theme' => 'pager_link__next',
+      '#theme' => 'link__pager__previous',
       '#text' => (isset($tags[3]) ? $tags[3] : t('››')),
-      '#attributes' => array('title' => t('Go to next page')),
-      '#page_new' => pager_load_array($pager_page_array[$element] + 1, $element, $pager_page_array),
-      '#element' => $element,
-      '#interval' => 1,
-      '#parameters' => $parameters,
+      '#path' => $current_path,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] + 1),
+        'attributes' => array(
+          'title' => t('Go to next page'),
+          'rel' => 'next',
+        ),
+      ),
     );
   }
 
@@ -1074,11 +1080,9 @@ function theme_views_mini_pager($vars) {
     '#wrapper_attributes' => array('class' => array('pager-next')),
   ) + $li_next;
 
-  return theme('item_list',
+  return theme('item_list__pager',
     array(
       'items' => $items,
-      'title' => NULL,
-      'type' => 'ul',
       'attributes' => array('class' => array('pager')),
     )
   );
