Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1204
diff -u -p -r1.1204 common.inc
--- includes/common.inc	10 Aug 2010 01:00:42 -0000	1.1204
+++ includes/common.inc	10 Aug 2010 15:40:38 -0000
@@ -2720,7 +2720,8 @@ function drupal_add_html_head_link($attr
  *   - 'media': The media type for the stylesheet, e.g., all, print, screen.
  *     Defaults to 'all'.
  *   - 'preprocess': If TRUE and CSS aggregation/compression is enabled, the
- *     styles will be aggregated and compressed. Defaults to FALSE.
+ *     styles will be aggregated and compressed. Defaults to FALSE for CSS added
+ *     via #attached, and to TRUE for CSS added via drupal_add_css().
  *   - 'browsers': An array containing information specifying which browsers
  *     should load the CSS item. See drupal_pre_render_conditional_comments()
  *     for details.
@@ -2748,7 +2749,8 @@ function drupal_add_css($data = NULL, $o
       'type' => 'file',
       'weight' => CSS_DEFAULT,
       'media' => 'all',
-      'preprocess' => FALSE,
+      // Preprocessing defaults to FALSE for #attached only.
+      'preprocess' => TRUE,
       'data' => $data,
       'browsers' => array(),
     );
@@ -3738,7 +3740,8 @@ function drupal_js_defaults($data = NULL
     'scope' => 'header',
     'cache' => TRUE,
     'defer' => FALSE,
-    'preprocess' => FALSE,
+    // Preprocessing defaults to FALSE for #attached only.
+    'preprocess' => TRUE,
     'version' => NULL,
     'data' => $data,
   );
@@ -3975,7 +3978,7 @@ function drupal_process_attached($elemen
       // (and only) argument.
       if (!is_array($options)) {
         $data = $options;
-        $options = NULL;
+        $options = array();
       }
       // In some cases, the first parameter ($data) is an array. Arrays can't be
       // passed as keys in PHP, so we have to get $data from the value array.
@@ -3983,10 +3986,15 @@ function drupal_process_attached($elemen
         $data = $options['data'];
         unset($options['data']);
       }
-      // Apply the default weight if the weight isn't explicitly given.
-      if (!isset($options['weight'])) {
-        $options['weight'] = $weight;
-      }
+      // Apply default options.
+      $options += array(
+        'weight' => $weight,
+        // By default, all files added via #attached are not preprocessed, since
+        // they are loaded conditionally.
+        // @see drupal_add_css()
+        // @see drupal_add_js()
+        'preprocess' => FALSE,
+      );
       call_user_func('drupal_add_' . $type, $data, $options);
     }
     unset($elements['#attached'][$type]);
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.953
diff -u -p -r1.953 system.module
--- modules/system/system.module	9 Aug 2010 16:54:50 -0000	1.953
+++ modules/system/system.module	10 Aug 2010 15:33:56 -0000
@@ -1064,9 +1064,8 @@ function system_library() {
     'website' => 'http://jquery.com',
     'version' => '1.4.2',
     'js' => array(
-      'misc/jquery.js' => array('weight' => JS_LIBRARY - 20),
+      'misc/jquery.js' => array('preprocess' => TRUE, 'weight' => JS_LIBRARY - 20),
     ),
-    'preprocess' => TRUE,
   );
 
   // jQuery Once.
@@ -1075,9 +1074,8 @@ function system_library() {
     'website' => 'http://plugins.jquery.com/project/once',
     'version' => '1.2',
     'js' => array(
-      'misc/jquery.once.js' => array('weight' => JS_LIBRARY - 19),
+      'misc/jquery.once.js' => array('preprocess' => TRUE, 'weight' => JS_LIBRARY - 19),
     ),
-    'preprocess' => TRUE,
   );
 
   // jQuery Form Plugin.
