=== modified file 'includes/module.inc'
--- includes/module.inc	
+++ includes/module.inc	
@@ -40,8 +40,8 @@ function module_iterate($function, $argu
  *   An associative array whose keys and values are the names of all loaded
  *   modules.
  */
-function module_list($refresh = FALSE, $bootstrap = TRUE) {
-  static $list;
+function module_list($refresh = FALSE, $bootstrap = TRUE, $sort = FALSE) {
+  static $list, $sorted_list;
 
   if ($refresh) {
     $list = array();
@@ -68,6 +68,13 @@ function module_list($refresh = FALSE, $
       }
     }
   }
+  if ($sort) {
+    if (!isset($sorted_list)) {
+      $sorted_list = $list;
+      ksort($sorted_list);
+    }
+    return $sorted_list;
+  }
   return $list;
 }
 
=== modified file 'modules/filter.module'
--- modules/filter.module	
+++ modules/filter.module	
@@ -611,7 +611,7 @@ function filter_formats() {
 function filter_list_all() {
   $filters = array();
 
-  foreach (module_list() as $module) {
+  foreach (module_list(FALSE, FALSE, TRUE) as $module) {
     $list = module_invoke($module, 'filter', 'list');
     if (isset($list) && is_array($list)) {
       foreach ($list as $delta => $name) {
=== modified file 'modules/help.module'
--- modules/help.module	
+++ modules/help.module	
@@ -68,7 +68,7 @@ function help_main() {
 
 function help_links_as_list() {
   $output = '<ul>';
-  foreach (module_list() as $name) {
+  foreach (module_list(FALSE, FALSE, TRUE) as $name) {
     if (module_hook($name, 'help')) {
       if (module_invoke($name, 'help', "admin/help#$name")) {
         $output .= '<li><a href="' . url("admin/help/$name") . '">' . t($name) . '</a></li>';
=== modified file 'modules/user.module'
--- modules/user.module	
+++ modules/user.module	
@@ -817,7 +817,7 @@ function user_set_authmaps($account, $au
 
 function user_auth_help_links() {
   $links = array();
-  foreach (module_list() as $module) {
+  foreach (module_list(FALSE, FALSE, TRUE) as $module) {
     if (module_hook($module, 'auth')) {
       $links[] = l(module_invoke($module, 'info', 'name'), "user/help#$module");
     }
@@ -1595,7 +1595,7 @@ function user_admin_perm($str_rids = NUL
 
   // Render role/permission overview:
   $options = array();
-  foreach (module_list() as $module) {
+  foreach (module_list(FALSE, FALSE, TRUE) as $module) {
     if ($permissions = module_invoke($module, 'perm')) {
       $form['permission'][] = array('#type' => 'markup', '#value' => t('%module module', array('%module' => $module)));
       asort($permissions);
@@ -1887,7 +1887,7 @@ function user_help($section) {
       <p>One of the more tedious moments in visiting a new website is filling out the registration form. Here at %site, you do not have to fill out a registration form if you are already a member of %help-links. This capability is called <em>distributed authentication</em>, and is unique to <a href=\"%drupal\">Drupal</a>, the software which powers %site.</p>
       <p>Distributed authentication enables a new user to input a username and password into the login box, and immediately be recognized, even if that user never registered at %site. This works because Drupal knows how to communicate with external registration databases. For example, lets say that new user 'Joe' is already a registered member of <a href=\"%delphi-forums\">Delphi Forums</a>. Drupal informs Joe on registration and login screens that he may login with his Delphi ID instead of registering with %site. Joe likes that idea, and logs in with a username of joe@remote.delphiforums.com and his usual Delphi password. Drupal then contacts the <em>remote.delphiforums.com</em> server behind the scenes (usually using <a href=\"%xml\">XML-RPC</a>, <a href=\"%http-post\">HTTP POST</a>, or <a href=\"%soap\">SOAP</a>) and asks: \"Is the password for user Joe correct?\".  If Delphi replies yes, then we create a new %site account for Joe and log him into it.  Joe may keep on logging into %site in the same manner, and he will always be logged into the same account.</p>", array('%help-links' => (implode(', ', user_auth_help_links())), '%site' => "<em>$site</em>", '%drupal' => 'http://www.drupal.org', '%delphi-forums' => 'http://www.delphiforums.com', '%xml' => 'http://www.xmlrpc.com', '%http-post' => 'http://www.w3.org/Protocols/', '%soap' => 'http://www.soapware.org'));
 
-        foreach (module_list() as $module) {
+        foreach (module_list(FALSE, FALSE, TRUE) as $module) {
           if (module_hook($module, 'auth')) {
             $output .= "<h4><a id=\"$module\"></a>". module_invoke($module, 'info', 'name') .'</h4>';
             $output .= module_invoke($module, 'help', "user/help#$module");
