Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.854
diff -u -r1.854 system.module
--- modules/system/system.module	2 Dec 2009 15:09:16 -0000	1.854
+++ modules/system/system.module	2 Dec 2009 22:23:01 -0000
@@ -2599,7 +2599,10 @@
   $form['description'] = array('#markup' => $description);
   $form[$name] = array('#type' => 'hidden', '#value' => 1);
 
-  $form['actions'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
+  $form['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('container-inline', 'form-actions')),
+  );
   $form['actions']['submit'] = array('#type' => 'submit', '#value' => $yes ? $yes : t('Confirm'));
   $form['actions']['cancel'] = array('#markup' => $cancel);
   // By default, render the form using theme_confirm_form().
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1174
diff -u -r1.1174 node.module
--- modules/node/node.module	2 Dec 2009 19:52:23 -0000	1.1174
+++ modules/node/node.module	2 Dec 2009 22:23:01 -0000
@@ -2173,9 +2173,9 @@
     }
 
     $build['default_message'] = array(
-      '#markup' => $default_message,
-      '#prefix' => '<div id="first-time">',
-      '#suffix' => '</div>',
+      '#type' => 'container',
+      '#id' => 'first-time',
+      '#children' => $default_message,
     );
   }
   return $build;
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.325
diff -u -r1.325 search.module
--- modules/search/search.module	1 Dec 2009 13:14:42 -0000	1.325
+++ modules/search/search.module	2 Dec 2009 22:23:01 -0000
@@ -867,7 +867,10 @@
   $form['#attributes']['class'][] = 'search-form';
   $form['module'] = array('#type' => 'value', '#value' => $type);
   $form['basic'] = array('#type' => 'item', '#title' => $prompt, '#id' => 'edit-keys');
-  $form['basic']['inline'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
+  $form['basic']['inline'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('container-inline')),
+  );
   $form['basic']['inline']['keys'] = array(
     '#type' => 'textfield',
     '#title' => '',
Index: modules/trigger/trigger.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.admin.inc,v
retrieving revision 1.21
diff -u -r1.21 trigger.admin.inc
--- modules/trigger/trigger.admin.inc	6 Nov 2009 03:59:06 -0000	1.21
+++ modules/trigger/trigger.admin.inc	2 Dec 2009 22:23:01 -0000
@@ -160,8 +160,8 @@
   }
 
   $form[$hook]['parent'] = array(
-    '#prefix' => "<div class='container-inline'>",
-    '#suffix' => '</div>',
+    '#type' => 'container',
+    '#attributes' => array('class' => array('container-inline')),
   );
   // List possible actions that may be assigned.
   if (count($options) != 0) {
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.304
diff -u -r1.304 filter.module
--- modules/filter/filter.module	1 Dec 2009 13:14:42 -0000	1.304
+++ modules/filter/filter.module	2 Dec 2009 22:23:01 -0000
@@ -692,8 +692,9 @@
     '#attributes' => array('class' => array('filter-wrapper')),
   );
   $form['format_guidelines'] = array(
-    '#prefix' => '<div id="' . $element_id . '-guidelines" class="filter-guidelines">',
-    '#suffix' => '</div>',
+    '#type' => 'container',
+    '#id' => $element_id . '-guidelines',
+    '#attributes' => array('class' => array('filter-guidelines')),
     '#weight' => 2,
   );
   foreach ($formats as $format) {
Index: modules/path/path.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v
retrieving revision 1.38
diff -u -r1.38 path.admin.inc
--- modules/path/path.admin.inc	2 Dec 2009 19:26:22 -0000	1.38
+++ modules/path/path.admin.inc	2 Dec 2009 22:23:01 -0000
@@ -220,7 +220,10 @@
   $form['basic'] = array('#type' => 'fieldset',
     '#title' => t('Filter aliases')
   );
-  $form['basic']['inline'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
+  $form['basic']['inline'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('container-inline')),
+  );
   $form['basic']['inline']['filter'] = array(
     '#type' => 'textfield',
     '#title' => '',
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.413
diff -u -r1.413 form.inc
--- includes/form.inc	2 Dec 2009 15:09:16 -0000	1.413
+++ includes/form.inc	2 Dec 2009 22:23:00 -0000
@@ -2278,17 +2278,21 @@
  *   The processed element.
  */
 function form_process_container($element, &$form_state) {
-  $element['#id'] = drupal_html_id(implode('-', $element['#parents']) . '-wrapper');
+  // Generate the ID of the element if it's not explicitly given.
+  if (!isset($element['#id'])) {
+    $element['#id'] = drupal_html_id(implode('-', $element['#parents']) . '-wrapper');
+  }
   return $element;
 }
 
 /**
  * Adds a container for grouped items
  *
- * @param $element
- *   An associative array containing the properties and children of the
- *   group.
- *   Properties used: #id, #attributes, #children.
+ * @param $variables
+ *   An associative array containing:
+ *   - element: An associative array containing the properties of the element.
+ *     Properties used: #id, #attributes, #children.
+ *
  * @return
  *   A themed HTML string representing the form element.
  *
