Index: modules/filter/filter.js
===================================================================
RCS file: modules/filter/filter.js
diff -N modules/filter/filter.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/filter/filter.js	7 Mar 2010 23:40:51 -0000
@@ -0,0 +1,21 @@
+// $Id: form.js,v 1.12 2009/10/16 16:37:00 dries Exp $
+(function ($) {
+
+/**
+ * Automatically display the guidelines of the selected text format.
+ */
+Drupal.behaviors.filterGuidelines = {
+  attach: function (context) {
+    $('.filter-guidelines', context).once('filter-guidelines')
+      .find('label').hide()
+      .parents('.filter-wrapper').find('select.filter-list')
+      .bind('change', function () {
+        $(this).parents('.filter-wrapper')
+          .find('.filter-guidelines-item').hide()
+          .siblings('#filter-guidelines-' + this.value).show();
+      })
+      .change();
+  }
+};
+
+})(jQuery);
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.321
diff -u -p -r1.321 filter.module
--- modules/filter/filter.module	7 Mar 2010 23:14:20 -0000	1.321
+++ modules/filter/filter.module	7 Mar 2010 23:39:42 -0000
@@ -746,8 +746,9 @@ function check_markup($text, $format_id 
  * If multiple text format-enabled elements are required on the same level of
  * the form structure, modules can set custom #parents on the original element.
  * Alternatively, the #after_build may be unset through a subsequent #process
- * callback. If no custom processing occurs, then the submitted form values will
- * appear like in the $form_state['input'] array above.
+ * callback. If the default #after_build is not invoked and no custom processing
+ * occurs, then the submitted form values will appear like in the
+ * $form_state['input'] array above.
  *
  * @see filter_form_after_build()
  *
@@ -785,11 +786,11 @@ function filter_process_format($element)
     '#processed',
     '#theme_wrappers',
   );
-  // Move this element into sub-element 'value'. 
+  // Move this element into sub-element 'value'.
   unset($element['value']);
-  foreach ($element as $key => $value) {
-    if ($key[0] === '#' && !in_array($key, $blacklist)) {
-      $element['value'][$key] = $value;
+  foreach (element_properties($element) as $key) {
+    if (!in_array($key, $blacklist)) {
+      $element['value'][$key] = $element[$key];
     }
   }
 
@@ -839,7 +840,6 @@ function filter_process_format($element)
     '#weight' => 10,
     '#attributes' => array('class' => array('filter-list')),
     '#parents' => array_merge($element['#parents'], array('format')),
-    '#value_callback' => 'filter_form_value_callback_format',
   );
 
   $element['format']['help'] = array(
@@ -853,23 +853,24 @@ function filter_process_format($element)
 }
 
 /**
- * After build, we need to move the values up in $form_state.
+ * After build callback to move #type 'text_format' values up in $form_state.
  */
 function filter_form_after_build($element, &$form_state) {
-  $parents = $element['#parents'];
-  $original_key = array_pop($parents);
-
   // For text fields, the additional subkeys map 1:1 to field schema columns.
   if (isset($element['#columns'])) {
     return $element;
   }
 
+  $parents = $element['#parents'];
+  array_pop($parents);
+
   foreach (element_children($element) as $key) {
     $current_parents = $parents;
     switch ($key) {
       case 'value':
         form_set_value(array('#parents' => $element['#parents']), $element[$key]['#value'], $form_state);
         break;
+
       case 'format':
         $current_parents[] = $key;
         form_set_value(array('#parents' => $current_parents), $element['format']['format']['#value'], $form_state);
