? FIELD-TO-COLUMN-PARTIAL.patch
? Makefile
? constants.pl
? d6-50-nodes.sql.gz
? d7-50-nodes-new.sql.gz
? d7-50-nodes.sql.gz
? head.kpf
? patches
? includes/autoload.inc
? modules/field/field.delete.inc
? modules/field/perl-field.autoload.inc
? modules/field/modules/combo
? scripts/OLD-generate-autoload.pl
? scripts/generate-autoload.pl
? sites/all/modules/cck
? sites/all/modules/devel
? sites/all/modules/pbs
? sites/all/modules/taint
? sites/default/files
? sites/default/settings.php
Index: modules/field/field.attach.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.attach.inc,v
retrieving revision 1.19
diff -u -F^[fc] -r1.19 field.attach.inc
--- modules/field/field.attach.inc	3 Jun 2009 02:41:07 -0000	1.19
+++ modules/field/field.attach.inc	4 Jun 2009 21:45:52 -0000
@@ -73,10 +73,6 @@ class FieldValidationException extends F
  */
 
 /**
- * @autoload field_attach_.* field_attach FieldException {
- */
-
-/**
  * @defgroup field_attach Field Attach API
  * @{
  * Operate on Field API data attached to Drupal objects.
@@ -279,13 +275,6 @@ function _field_invoke_multiple_default(
 }
 
 /**
- * @} End of "defgroup field_attach"
- *
- * The rest of the functions in this file are not in a group, but
- * their automatically-generated autoloaders are (see field.autoload.inc).
- */
-
-/**
  * Add form elements for all fields for an object to a form structure.
  *
  * @param $obj_type
@@ -301,7 +290,7 @@ function _field_invoke_multiple_default(
  * TODO : document the resulting $form structure, like we do for
  * field_attach_view().
  */
-function _field_attach_form($obj_type, $object, &$form, $form_state) {
+function al_field_attach_form($obj_type, $object, &$form, $form_state) {
   // TODO : something's not right here : do we alter the form or return a value ?
   $form += (array) _field_invoke_default('form', $obj_type, $object, $form, $form_state);
 
@@ -331,7 +320,7 @@ function _field_attach_form($obj_type, $
  *   Loaded field values are added to $objects. Fields with no values should be
  *   set as an empty array.
  */
-function _field_attach_load($obj_type, $objects, $age = FIELD_LOAD_CURRENT) {
+function al_field_attach_load($obj_type, $objects, $age = FIELD_LOAD_CURRENT) {
   $load_current = $age == FIELD_LOAD_CURRENT;
 
   $info = field_info_fieldable_types($obj_type);
@@ -421,7 +410,7 @@ function _field_attach_load($obj_type, $
  *   On return, the objects in $objects are modified by having the
  *   appropriate set of fields added.
  */
-function _field_attach_load_revision($obj_type, $objects) {
+function al_field_attach_load_revision($obj_type, $objects) {
   return field_attach_load($obj_type, $objects, FIELD_LOAD_REVISION);
 }
 
@@ -440,7 +429,7 @@ function _field_attach_load_revision($ob
  * @return
  *   Throws a FieldValidationException if validation errors are found.
  */
-function _field_attach_validate($obj_type, $object) {
+function al_field_attach_validate($obj_type, $object) {
   $errors = array();
   _field_invoke_default('validate', $obj_type, $object, $errors);
   _field_invoke('validate', $obj_type, $object, $errors);
@@ -484,7 +473,7 @@ function _field_attach_validate($obj_typ
  * @param $form_state
  *   An associative array containing the current state of the form.
  */
-function _field_attach_form_validate($obj_type, $object, $form, &$form_state) {
+function al_field_attach_form_validate($obj_type, $object, $form, &$form_state) {
   // Extract field values from submitted values.
   _field_invoke_default('extract_form_values', $obj_type, $object, $form, $form_state);
 
@@ -516,7 +505,7 @@ function _field_attach_form_validate($ob
  * @param $form_state
  *   An associative array containing the current state of the form.
  */
-function _field_attach_submit($obj_type, $object, $form, &$form_state) {
+function al_field_attach_submit($obj_type, $object, $form, &$form_state) {
   // Extract field values from submitted values.
   _field_invoke_default('extract_form_values', $obj_type, $object, $form, $form_state);
 
@@ -540,7 +529,7 @@ function _field_attach_submit($obj_type,
  * @param $object
  *   The object with fields to process.
  */
-function _field_attach_presave($obj_type, $object) {
+function al_field_attach_presave($obj_type, $object) {
   // TODO : to my knowledge, no field module has any use for 'presave' on D6.
   // should we keep this ?
   _field_invoke('presave', $obj_type, $object);
@@ -568,7 +557,7 @@ function _field_attach_presave($obj_type
  *   Default values (if any) will be added to the $object parameter for fields
  *   it leaves unspecified.
  */
-function _field_attach_insert($obj_type, $object) {
+function al_field_attach_insert($obj_type, $object) {
   _field_invoke_default('insert', $obj_type, $object);
   _field_invoke('insert', $obj_type, $object);
 
@@ -597,7 +586,7 @@ function _field_attach_insert($obj_type,
  * @param $object
  *   The object with fields to save.
  */
-function _field_attach_update($obj_type, $object) {
+function al_field_attach_update($obj_type, $object) {
   _field_invoke('update', $obj_type, $object);
 
   // Let other modules act on updating the object, accumulating saved
@@ -626,7 +615,7 @@ function _field_attach_update($obj_type,
  * @param $object
  *   The object whose field data to delete.
  */
-function _field_attach_delete($obj_type, $object) {
+function al_field_attach_delete($obj_type, $object) {
   _field_invoke('delete', $obj_type, $object);
   module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_delete', $obj_type, $object);
 
@@ -651,7 +640,7 @@ function _field_attach_delete($obj_type,
  * @param $object
  *   The object with fields to save.
  */
-function _field_attach_delete_revision($obj_type, $object) {
+function al_field_attach_delete_revision($obj_type, $object) {
   _field_invoke('delete revision', $obj_type, $object);
   module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_delete_revision', $obj_type, $object);
 
@@ -677,7 +666,7 @@ function _field_attach_delete_revision($
  * @return
  *   A structured content array tree for drupal_render().
  */
-function _field_attach_view($obj_type, $object, $teaser = FALSE) {
+function al_field_attach_view($obj_type, $object, $teaser = FALSE) {
   // Let field modules sanitize their data for output.
   _field_invoke('sanitize', $obj_type, $object);
 
@@ -697,7 +686,7 @@ function _field_attach_view($obj_type, $
  *   containing the themed output for the whole field.
  * - Adds the formatted values in the 'view' key of the items.
  */
-function _field_attach_preprocess($obj_type, $object) {
+function al_field_attach_preprocess($obj_type, $object) {
   return _field_invoke_default('preprocess', $obj_type, $object);
 }
 
@@ -706,7 +695,7 @@ function _field_attach_preprocess($obj_t
  *
  * TODO D7: We do not yet know if this really belongs in Field API.
  */
-function _field_attach_prepare_translation($node) {
+function al_field_attach_prepare_translation($node) {
   // Prevent against invalid 'nodes' built by broken 3rd party code.
   if (isset($node->type)) {
     $type = content_types($node->type);
@@ -730,7 +719,7 @@ function _field_attach_prepare_translati
  * @param $bundle
  *   The name of the newly created bundle.
  */
-function _field_attach_create_bundle($bundle) {
+function al_field_attach_create_bundle($bundle) {
   module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_create_bundle', $bundle);
 
   // Clear the cache.
@@ -750,7 +739,7 @@ function _field_attach_create_bundle($bu
  * @param $bundle_new
  *   The new name of the bundle.
  */
-function _field_attach_rename_bundle($bundle_old, $bundle_new) {
+function al_field_attach_rename_bundle($bundle_old, $bundle_new) {
   module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_rename_bundle', $bundle_old, $bundle_new);
   db_update('field_config_instance')
     ->fields(array('bundle' => $bundle_new))
@@ -779,7 +768,7 @@ function _field_attach_rename_bundle($bu
  * @param $bundle
  *   The bundle to delete.
  */
-function _field_attach_delete_bundle($bundle) {
+function al_field_attach_delete_bundle($bundle) {
   // Delete the instances themseves
   $instances = field_info_instances($bundle);
   foreach ($instances as $instance) {
@@ -809,7 +798,7 @@ function _field_attach_delete_bundle($bu
  *   2: bundle name of the object
  *   3: whether $obj_type's fields should be cached (TRUE/FALSE)
  */
-function _field_attach_extract_ids($object_type, $object) {
+function al_field_attach_extract_ids($object_type, $object) {
   // TODO D7 : prevent against broken 3rd party $node without 'type'.
   $info = field_info_fieldable_types($object_type);
   // Objects being created might not have id/vid yet.
@@ -823,5 +812,9 @@ function _field_attach_extract_ids($obje
 }
 
 /**
- * @autoload} End of "@autoload field_attach"
+ * @} End of "defgroup field_attach"
+ *
+ * The rest of the functions in this file are not in a group, but
+ * their automatically-generated autoloaders are (see field.autoload.inc).
  */
+
Index: modules/field/field.autoload.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.autoload.inc,v
retrieving revision 1.11
diff -u -F^[fc] -r1.11 field.autoload.inc
--- modules/field/field.autoload.inc	3 Jun 2009 02:41:07 -0000	1.11
+++ modules/field/field.autoload.inc	4 Jun 2009 21:45:52 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: field.autoload.inc,v 1.11 2009/06/03 02:41:07 webchick Exp $
+// $Id$
 
 /**
  * DO NOT EDIT THIS FILE.  It contains autoloading functions generated
@@ -29,11 +29,11 @@
  * TODO : document the resulting $form structure, like we do for
  * field_attach_view().
  *
- * This function is an autoloader for _field_attach_form() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_form() in modules/field/field.attach.inc.
  */
 function field_attach_form($obj_type, $object, &$form, $form_state) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_form($obj_type, $object, $form, $form_state);
+  return al_field_attach_form($obj_type, $object, $form, $form_state);
 }
 
 /**
@@ -55,11 +55,11 @@ function field_attach_form($obj_type, $o
  *   Loaded field values are added to $objects. Fields with no values should be
  *   set as an empty array.
  *
- * This function is an autoloader for _field_attach_load() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_load() in modules/field/field.attach.inc.
  */
 function field_attach_load($obj_type, $objects, $age = FIELD_LOAD_CURRENT) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_load($obj_type, $objects, $age);
+  return al_field_attach_load($obj_type, $objects, $age);
 }
 
 /**
@@ -79,11 +79,11 @@ function field_attach_load($obj_type, $o
  *   On return, the objects in $objects are modified by having the
  *   appropriate set of fields added.
  *
- * This function is an autoloader for _field_attach_load_revision() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_load_revision() in modules/field/field.attach.inc.
  */
 function field_attach_load_revision($obj_type, $objects) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_load_revision($obj_type, $objects);
+  return al_field_attach_load_revision($obj_type, $objects);
 }
 
 /**
@@ -101,11 +101,11 @@ function field_attach_load_revision($obj
  * @return
  *   Throws a FieldValidationException if validation errors are found.
  *
- * This function is an autoloader for _field_attach_validate() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_validate() in modules/field/field.attach.inc.
  */
 function field_attach_validate($obj_type, $object) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_validate($obj_type, $object);
+  return al_field_attach_validate($obj_type, $object);
 }
 
 /**
@@ -136,11 +136,11 @@ function field_attach_validate($obj_type
  * @param $form_state
  *   An associative array containing the current state of the form.
  *
- * This function is an autoloader for _field_attach_form_validate() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_form_validate() in modules/field/field.attach.inc.
  */
 function field_attach_form_validate($obj_type, $object, $form, &$form_state) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_form_validate($obj_type, $object, $form, $form_state);
+  return al_field_attach_form_validate($obj_type, $object, $form, $form_state);
 }
 
 /**
@@ -160,11 +160,11 @@ function field_attach_form_validate($obj
  * @param $form_state
  *   An associative array containing the current state of the form.
  *
- * This function is an autoloader for _field_attach_submit() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_submit() in modules/field/field.attach.inc.
  */
 function field_attach_submit($obj_type, $object, $form, &$form_state) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_submit($obj_type, $object, $form, $form_state);
+  return al_field_attach_submit($obj_type, $object, $form, $form_state);
 }
 
 /**
@@ -178,11 +178,11 @@ function field_attach_submit($obj_type, 
  * @param $object
  *   The object with fields to process.
  *
- * This function is an autoloader for _field_attach_presave() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_presave() in modules/field/field.attach.inc.
  */
 function field_attach_presave($obj_type, $object) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_presave($obj_type, $object);
+  return al_field_attach_presave($obj_type, $object);
 }
 
 /**
@@ -190,7 +190,7 @@ function field_attach_presave($obj_type,
  *
  * The passed in object must already contain its id and (if applicable)
  * revision id attributes.
- * Default values (if any) will be inserted for fields not present in the
+ * Default values (if any) will be saved for fields not present in the
  * $object.
  *
  * @param $obj_type
@@ -201,11 +201,11 @@ function field_attach_presave($obj_type,
  *   Default values (if any) will be added to the $object parameter for fields
  *   it leaves unspecified.
  *
- * This function is an autoloader for _field_attach_insert() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_insert() in modules/field/field.attach.inc.
  */
 function field_attach_insert($obj_type, $object) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_insert($obj_type, $object);
+  return al_field_attach_insert($obj_type, $object);
 }
 
 /**
@@ -216,11 +216,11 @@ function field_attach_insert($obj_type, 
  * @param $object
  *   The object with fields to save.
  *
- * This function is an autoloader for _field_attach_update() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_update() in modules/field/field.attach.inc.
  */
 function field_attach_update($obj_type, $object) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_update($obj_type, $object);
+  return al_field_attach_update($obj_type, $object);
 }
 
 /**
@@ -232,11 +232,11 @@ function field_attach_update($obj_type, 
  * @param $object
  *   The object whose field data to delete.
  *
- * This function is an autoloader for _field_attach_delete() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_delete() in modules/field/field.attach.inc.
  */
 function field_attach_delete($obj_type, $object) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_delete($obj_type, $object);
+  return al_field_attach_delete($obj_type, $object);
 }
 
 /**
@@ -248,11 +248,11 @@ function field_attach_delete($obj_type, 
  * @param $object
  *   The object with fields to save.
  *
- * This function is an autoloader for _field_attach_delete_revision() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_delete_revision() in modules/field/field.attach.inc.
  */
 function field_attach_delete_revision($obj_type, $object) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_delete_revision($obj_type, $object);
+  return al_field_attach_delete_revision($obj_type, $object);
 }
 
 /**
@@ -270,11 +270,11 @@ function field_attach_delete_revision($o
  * @return
  *   A structured content array tree for drupal_render().
  *
- * This function is an autoloader for _field_attach_view() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_view() in modules/field/field.attach.inc.
  */
 function field_attach_view($obj_type, $object, $teaser = FALSE) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_view($obj_type, $object, $teaser);
+  return al_field_attach_view($obj_type, $object, $teaser);
 }
 
 /**
@@ -284,11 +284,11 @@ function field_attach_view($obj_type, $o
  *   containing the themed output for the whole field.
  * - Adds the formatted values in the 'view' key of the items.
  *
- * This function is an autoloader for _field_attach_preprocess() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_preprocess() in modules/field/field.attach.inc.
  */
 function field_attach_preprocess($obj_type, $object) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_preprocess($obj_type, $object);
+  return al_field_attach_preprocess($obj_type, $object);
 }
 
 /**
@@ -296,11 +296,11 @@ function field_attach_preprocess($obj_ty
  *
  * TODO D7: We do not yet know if this really belongs in Field API.
  *
- * This function is an autoloader for _field_attach_prepare_translation() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_prepare_translation() in modules/field/field.attach.inc.
  */
 function field_attach_prepare_translation($node) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_prepare_translation($node);
+  return al_field_attach_prepare_translation($node);
 }
 
 /**
@@ -312,11 +312,11 @@ function field_attach_prepare_translatio
  * @param $bundle
  *   The name of the newly created bundle.
  *
- * This function is an autoloader for _field_attach_create_bundle() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_create_bundle() in modules/field/field.attach.inc.
  */
 function field_attach_create_bundle($bundle) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_create_bundle($bundle);
+  return al_field_attach_create_bundle($bundle);
 }
 
 /**
@@ -327,11 +327,11 @@ function field_attach_create_bundle($bun
  * @param $bundle_new
  *   The new name of the bundle.
  *
- * This function is an autoloader for _field_attach_rename_bundle() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_rename_bundle() in modules/field/field.attach.inc.
  */
 function field_attach_rename_bundle($bundle_old, $bundle_new) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_rename_bundle($bundle_old, $bundle_new);
+  return al_field_attach_rename_bundle($bundle_old, $bundle_new);
 }
 
 /**
@@ -347,11 +347,11 @@ function field_attach_rename_bundle($bun
  * @param $bundle
  *   The bundle to delete.
  *
- * This function is an autoloader for _field_attach_delete_bundle() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_delete_bundle() in modules/field/field.attach.inc.
  */
 function field_attach_delete_bundle($bundle) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_delete_bundle($bundle);
+  return al_field_attach_delete_bundle($bundle);
 }
 
 /**
@@ -370,11 +370,11 @@ function field_attach_delete_bundle($bun
  *   2: bundle name of the object
  *   3: whether $obj_type's fields should be cached (TRUE/FALSE)
  *
- * This function is an autoloader for _field_attach_extract_ids() in modules/field/field.attach.inc.
+ * This function is an autoloader for al_field_attach_extract_ids() in modules/field/field.attach.inc.
  */
 function field_attach_extract_ids($object_type, $object) {
   require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
-  return _field_attach_extract_ids($object_type, $object);
+  return al_field_attach_extract_ids($object_type, $object);
 }
 
 /**
@@ -382,6 +382,212 @@ function field_attach_extract_ids($objec
  */
 
 /**
+ * @ingroup field_crud
+ * @{
+ */
+
+/**
+ * Create a field.
+ *
+ * This function does not bind the field to any bundle; use
+ * field_create_instance() for that.
+ *
+ * @param $field
+ *   A field structure. The field_name and type properties are required.
+ *   Other properties, if omitted, will be given the following default values:
+ *   - cardinality: 1
+ *   - locked: FALSE
+ *   - indexes: the field-type indexes, specified by the field type's
+ *     hook_field_schema(). The indexes specified in $field are added
+ *     to those default indexes. It is possible to override the
+ *     definition of a field-type index by providing an index with the
+ *     same name, or to remove it by redefining it as an empty array
+ *     of columns. Overriding field-type indexes should be done
+ *     carefully, for it might seriously affect the site's performance.
+ *   - settings: each omitted setting is given the default value defined in
+ *     hook_field_info().
+ * @return
+ *   The $field structure with the id property filled in.
+ * @throw
+ *   FieldException
+ *
+ * This function is an autoloader for al_field_create_field() in modules/field/field.crud.inc.
+ */
+function field_create_field($field) {
+  require_once DRUPAL_ROOT . '/modules/field/field.crud.inc';
+  return al_field_create_field($field);
+}
+
+/**
+ * Read a single field record directly from the database. Generally,
+ * you should use the field_info_field() instead.
+ *
+ * This function will not return deleted fields. Use
+ * field_read_fields() instead for this purpose.
+ *
+ * @param $field_name
+ *   The field name to read.
+ * @param array $include_additional
+ *   The default behavior of this function is to not return a field that
+ *   is inactive. Setting
+ *   $include_additional['include_inactive'] to TRUE will override this
+ *   behavior.
+ * @return
+ *   A field structure, or FALSE.
+ *
+ * This function is an autoloader for al_field_read_field() in modules/field/field.crud.inc.
+ */
+function field_read_field($field_name, $include_additional = array() {
+  require_once DRUPAL_ROOT . '/modules/field/field.crud.inc';
+  return al_field_read_field($field_name, $include_additional);
+}
+
+/**
+ * Read in fields that match an array of conditions.
+ *
+ * @param array $params
+ *   An array of conditions to match against.
+ * @param array $include_additional
+ *   The default behavior of this function is to not return fields that
+ *   are inactive or have been deleted. Setting
+ *   $include_additional['include_inactive'] or
+ *   $include_additional['include_deleted'] to TRUE will override this
+ *   behavior.
+ * @return
+ *   An array of fields matching $params. If
+ *   $include_additional['include_deletd'] is TRUE, the array is keyed
+ *   by field id, otherwise it is keyed by field name.
+ *
+ * This function is an autoloader for al_field_read_fields() in modules/field/field.crud.inc.
+ */
+function field_read_fields($params = array() {
+  require_once DRUPAL_ROOT . '/modules/field/field.crud.inc';
+  return al_field_read_fields($params);
+}
+
+/**
+ * Mark a field for deletion, including all its instances and all data
+ * associated with it.
+ *
+ * @param $field_name
+ *   The field name to delete.
+ *
+ * This function is an autoloader for al_field_delete_field() in modules/field/field.crud.inc.
+ */
+function field_delete_field($field_name) {
+  require_once DRUPAL_ROOT . '/modules/field/field.crud.inc';
+  return al_field_delete_field($field_name);
+}
+
+/**
+ * Creates an instance of a field, binding it to a bundle.
+ *
+ * @param $instance
+ *   A field instance structure. The field_name and bundle properties are
+ *   required.
+ *   Other properties, if omitted, will be given the following default values:
+ *   - label: the field name
+ *   - description: empty string
+ *   - weight: 0
+ *   - required: FALSE
+ *   - default_value_function: empty string
+ *   - settings: each omitted setting is given the default value specified in
+ *     hook_field_info().
+ *   - widget:
+ *     - type: the default widget specified in hook_field_info().
+ *     - settings: each omitted setting is given the default value specified in
+ *       hook_field_widget_info().
+ *   - display:
+ *     Settings for the 'full' build mode will be added, and each build mode
+ *     will be completed with the follwong default values:
+ *     - label: 'above'
+ *     - exclude: FALSE
+ *       TODO This is subject to change, see: http://drupal.org/node/367215
+ *     - type: the default formatter specified in hook_field_info().
+ *     - settings: each omitted setting is given the default value specified in
+ *       hook_field_formatter_info().
+ * @return
+ *   The $instance structure with the id property filled in.
+ * @throw
+ *   FieldException
+ *
+ * This function is an autoloader for al_field_create_instance() in modules/field/field.crud.inc.
+ */
+function field_create_instance($instance) {
+  require_once DRUPAL_ROOT . '/modules/field/field.crud.inc';
+  return al_field_create_instance($instance);
+}
+
+/**
+ * Read a single instance record directly from the database. Generally,
+ * you should use the field_info_instance() instead.
+ *
+ * This function will not return deleted instances. Use
+ * field_read_instances() instead for this purpose.
+ *
+ * @param $field_name
+ *   The field name to read.
+ * @param $bundle
+ *   The bundle to which the field is bound.
+ * @param array $include_additional
+ *   The default behavior of this function is to not return an instance that
+ *   is inactive. Setting
+ *   $include_additional['include_inactive'] to TRUE will override this
+ *   behavior.
+ * @return
+ *   An instance structure, or FALSE.
+ *
+ * This function is an autoloader for al_field_read_instance() in modules/field/field.crud.inc.
+ */
+function field_read_instance($field_name, $bundle, $include_additional = array() {
+  require_once DRUPAL_ROOT . '/modules/field/field.crud.inc';
+  return al_field_read_instance($field_name, $bundle, $include_additional);
+}
+
+/**
+ * Read in field instances that match an array of conditions.
+ *
+ * @param $param
+ *   An array of properties to use in selecting a field
+ *   instance. Valid keys include any column of the
+ *   field_config_instance table. If NULL, all instances will be returned.
+ * @param $include_additional
+ *   The default behavior of this function is to not return field
+ *   instances that are inactive or have been marked deleted. Setting
+ *   $include_additional['include_inactive'] or
+ *   $include_additional['include_deleted'] to TRUE will override this
+ *   behavior.
+ * @return
+ *   An array of instances matching the arguments.
+ *
+ * This function is an autoloader for al_field_read_instances() in modules/field/field.crud.inc.
+ */
+function field_read_instances($params = array() {
+  require_once DRUPAL_ROOT . '/modules/field/field.crud.inc';
+  return al_field_read_instances($params);
+}
+
+/**
+ * Mark a field instance for deletion, including all data associated with
+ * it.
+ *
+ * @param $field_name
+ *   The name of the field whose instance will be deleted.
+ * @param $bundle
+ *   The bundle for the instance which will be deleted.
+ *
+ * This function is an autoloader for al_field_delete_instance() in modules/field/field.crud.inc.
+ */
+function field_delete_instance($field_name, $bundle) {
+  require_once DRUPAL_ROOT . '/modules/field/field.crud.inc';
+  return al_field_delete_instance($field_name, $bundle);
+}
+
+/**
+ * @} End of "field_crud"
+ */
+
+/**
  * @ingroup field_info
  * @{
  */
@@ -401,11 +607,11 @@ function field_attach_extract_ids($objec
  *    FIELD_BEHAVIOR_CUSTOM  - use the field's callback function.
  *    FIELD_BEHAVIOR_DEFAULT - use field.module default behavior.
  *
- * This function is an autoloader for _field_behaviors_field() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_behaviors_field() in modules/field/field.info.inc.
  */
 function field_behaviors_field($op, $field) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_behaviors_field($op, $field);
+  return al_field_behaviors_field($op, $field);
 }
 
 /**
@@ -422,11 +628,11 @@ function field_behaviors_field($op, $fie
  *    FIELD_BEHAVIOR_CUSTOM  - use the widget's callback function.
  *    FIELD_BEHAVIOR_DEFAULT - use field.module default behavior.
  *
- * This function is an autoloader for _field_behaviors_widget() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_behaviors_widget() in modules/field/field.info.inc.
  */
 function field_behaviors_widget($op, $instance) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_behaviors_widget($op, $instance);
+  return al_field_behaviors_widget($op, $instance);
 }
 
 /**
@@ -443,11 +649,11 @@ function field_behaviors_widget($op, $in
  *    FIELD_BEHAVIOR_CUSTOM  - use the formatter's callback function.
  *    FIELD_BEHAVIOR_DEFAULT - use field module default behavior.
  *
- * This function is an autoloader for _field_behaviors_formatter() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_behaviors_formatter() in modules/field/field.info.inc.
  */
 function field_behaviors_formatter($op, $display) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_behaviors_formatter($op, $display);
+  return al_field_behaviors_formatter($op, $display);
 }
 
 /**
@@ -460,11 +666,11 @@ function field_behaviors_formatter($op, 
  *   Either a field type description, as provided by hook_field_info(), or an
  *   array of all existing field types, keyed by field type name.
  *
- * This function is an autoloader for _field_info_field_types() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_field_types() in modules/field/field.info.inc.
  */
 function field_info_field_types($field_type = NULL) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_field_types($field_type);
+  return al_field_info_field_types($field_type);
 }
 
 /**
@@ -478,11 +684,11 @@ function field_info_field_types($field_t
  *   hook_field_widget_info(), or an array of all existing widget
  *   types, keyed by widget type name.
  *
- * This function is an autoloader for _field_info_widget_types() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_widget_types() in modules/field/field.info.inc.
  */
 function field_info_widget_types($widget_type = NULL) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_widget_types($widget_type);
+  return al_field_info_widget_types($widget_type);
 }
 
 /**
@@ -495,11 +701,11 @@ function field_info_widget_types($widget
  *   Either a formatter type description, as provided by hook_field_formatter_info(),
  *   or an array of all existing widget types, keyed by widget type name.
  *
- * This function is an autoloader for _field_info_formatter_types() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_formatter_types() in modules/field/field.info.inc.
  */
 function field_info_formatter_types($formatter_type = NULL) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_formatter_types($formatter_type);
+  return al_field_info_formatter_types($formatter_type);
 }
 
 /**
@@ -512,22 +718,22 @@ function field_info_formatter_types($for
  *   Either a fieldable type description, as provided by hook_fieldable_info(),
  *   or an array of all existing fieldable types, keyed by fieldable type name.
  *
- * This function is an autoloader for _field_info_fieldable_types() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_fieldable_types() in modules/field/field.info.inc.
  */
 function field_info_fieldable_types($obj_type = NULL) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_fieldable_types($obj_type);
+  return al_field_info_fieldable_types($obj_type);
 }
 
 /**
  * Return an array of fieldable bundle names and labels, for an individual
  * object type or for all object types.
  *
- * This function is an autoloader for _field_info_bundles() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_bundles() in modules/field/field.info.inc.
  */
 function field_info_bundles($obj_type = NULL) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_bundles($obj_type);
+  return al_field_info_bundles($obj_type);
 }
 
 /**
@@ -535,11 +741,11 @@ function field_info_bundles($obj_type = 
  * // TODO : might not be needed depending on how we solve
  * // the 'namespace bundle names' issue
  *
- * This function is an autoloader for _field_info_bundle_entity() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_bundle_entity() in modules/field/field.info.inc.
  */
 function field_info_bundle_entity($bundle) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_bundle_entity($bundle);
+  return al_field_info_bundle_entity($bundle);
 }
 
 /**
@@ -550,11 +756,11 @@ function field_info_bundle_entity($bundl
  *   property, bundles, which is an array of all the bundles to which
  *   this field belongs.
  *
- * This function is an autoloader for _field_info_fields() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_fields() in modules/field/field.info.inc.
  */
 function field_info_fields() {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_fields();
+  return al_field_info_fields();
 }
 
 /**
@@ -567,11 +773,11 @@ function field_info_fields() {
  *   property, bundles, which is an array of all the bundles to which
  *   this field belongs.
  *
- * This function is an autoloader for _field_info_field() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_field() in modules/field/field.info.inc.
  */
 function field_info_field($field_name) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_field($field_name);
+  return al_field_info_field($field_name);
 }
 
 /**
@@ -581,21 +787,21 @@ function field_info_field($field_name) {
  * @param $bundle_name
  *   If set, return information on just this bundle.
  *
- * This function is an autoloader for _field_info_instances() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_instances() in modules/field/field.info.inc.
  */
 function field_info_instances($bundle_name = NULL) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_instances($bundle_name);
+  return al_field_info_instances($bundle_name);
 }
 
 /**
  * Return an array of instance data for a specific field and bundle.
  *
- * This function is an autoloader for _field_info_instance() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_instance() in modules/field/field.info.inc.
  */
 function field_info_instance($field_name, $bundle_name) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_instance($field_name, $bundle_name);
+  return al_field_info_instance($field_name, $bundle_name);
 }
 
 /**
@@ -607,11 +813,11 @@ function field_info_instance($field_name
  *   The field type's default settings, as provided by hook_field_info(), or an
  *   empty array.
  *
- * This function is an autoloader for _field_info_field_settings() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_field_settings() in modules/field/field.info.inc.
  */
 function field_info_field_settings($type) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_field_settings($type);
+  return al_field_info_field_settings($type);
 }
 
 /**
@@ -623,11 +829,11 @@ function field_info_field_settings($type
  *   The field type's default instance settings, as provided by
  *   hook_field_info(), or an empty array.
  *
- * This function is an autoloader for _field_info_instance_settings() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_instance_settings() in modules/field/field.info.inc.
  */
 function field_info_instance_settings($type) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_instance_settings($type);
+  return al_field_info_instance_settings($type);
 }
 
 /**
@@ -639,11 +845,11 @@ function field_info_instance_settings($t
  *   The field type's default settings, as provided by hook_field_info(), or an
  *   empty array.
  *
- * This function is an autoloader for _field_info_widget_settings() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_widget_settings() in modules/field/field.info.inc.
  */
 function field_info_widget_settings($type) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_widget_settings($type);
+  return al_field_info_widget_settings($type);
 }
 
 /**
@@ -655,11 +861,11 @@ function field_info_widget_settings($typ
  *   The field formatter's default settings, as provided by
  *   hook_field_info(), or an empty array.
  *
- * This function is an autoloader for _field_info_formatter_settings() in modules/field/field.info.inc.
+ * This function is an autoloader for al_field_info_formatter_settings() in modules/field/field.info.inc.
  */
 function field_info_formatter_settings($type) {
   require_once DRUPAL_ROOT . '/modules/field/field.info.inc';
-  return _field_info_formatter_settings($type);
+  return al_field_info_formatter_settings($type);
 }
 
 /**
Index: modules/field/field.crud.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.crud.inc,v
retrieving revision 1.14
diff -u -F^[fc] -r1.14 field.crud.inc
--- modules/field/field.crud.inc	28 May 2009 10:05:32 -0000	1.14
+++ modules/field/field.crud.inc	4 Jun 2009 21:45:52 -0000
@@ -202,7 +202,7 @@
  * @throw
  *   FieldException
  */
-function field_create_field($field) {
+function al_field_create_field($field) {
   // Field name is required.
   if (empty($field['field_name'])) {
     throw new FieldException('Attempt to create an unnamed field.');
@@ -295,7 +295,7 @@ function field_create_field($field) {
  * @return
  *   A field structure, or FALSE.
  */
-function field_read_field($field_name, $include_additional = array()) {
+function al_field_read_field($field_name, $include_additional = array()) {
   $fields = field_read_fields(array('field_name' => $field_name), $include_additional);
   return $fields ? current($fields) : FALSE;
 }
@@ -316,7 +316,7 @@ function field_read_field($field_name, $
  *   $include_additional['include_deletd'] is TRUE, the array is keyed
  *   by field id, otherwise it is keyed by field name.
  */
-function field_read_fields($params = array(), $include_additional = array()) {
+function al_field_read_fields($params = array(), $include_additional = array()) {
   $query = db_select('field_config', 'fc', array('fetch' => PDO::FETCH_ASSOC));
   $query->fields('fc');
 
@@ -363,7 +363,7 @@ function field_read_fields($params = arr
  * @param $field_name
  *   The field name to delete.
  */
-function field_delete_field($field_name) {
+function al_field_delete_field($field_name) {
   // Mark field storage for deletion.
   module_invoke(variable_get('field_storage_module', 'field_sql_storage'), 'field_storage_delete_field', $field_name);
 
@@ -415,7 +415,7 @@ function field_delete_field($field_name)
  * @throw
  *   FieldException
  */
-function field_create_instance($instance) {
+function al_field_create_instance($instance) {
   // Check that the specified field exists.
   $field = field_read_field($instance['field_name']);
   if (empty($field)) {
@@ -466,7 +466,7 @@ function field_create_instance($instance
  *   FieldException
  * @see field_create_instance()
  */
-function field_update_instance($instance) {
+function al_field_update_instance($instance) {
   // Check that the specified field exists.
   $field = field_read_field($instance['field_name']);
   if (empty($field)) {
@@ -597,7 +597,7 @@ function _field_write_instance($instance
  * @return
  *   An instance structure, or FALSE.
  */
-function field_read_instance($field_name, $bundle, $include_additional = array()) {
+function al_field_read_instance($field_name, $bundle, $include_additional = array()) {
   $instances = field_read_instances(array('field_name' => $field_name, 'bundle' => $bundle), $include_additional);
   return $instances ? current($instances) : FALSE;
 }
@@ -618,7 +618,7 @@ function field_read_instance($field_name
  * @return
  *   An array of instances matching the arguments.
  */
-function field_read_instances($params = array(), $include_additional = array()) {
+function al_field_read_instances($params = array(), $include_additional = array()) {
   $query = db_select('field_config_instance', 'fci', array('fetch' => PDO::FETCH_ASSOC));
   $query->join('field_config', 'fc', 'fc.id = fci.field_id');
   $query->fields('fci');
@@ -670,7 +670,7 @@ function field_read_instances($params = 
  * @param $bundle
  *   The bundle for the instance which will be deleted.
  */
-function field_delete_instance($field_name, $bundle) {
+function al_field_delete_instance($field_name, $bundle) {
   // Mark the field instance for deletion.
   db_update('field_config_instance')
     ->fields(array('deleted' => 1))
Index: modules/field/field.info.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.info.inc,v
retrieving revision 1.5
diff -u -F^[fc] -r1.5 field.info.inc
--- modules/field/field.info.inc	13 Apr 2009 05:18:17 -0000	1.5
+++ modules/field/field.info.inc	4 Jun 2009 21:45:52 -0000
@@ -63,7 +63,7 @@ function _field_get_formatter($display, 
  * formatter_type.
  *   * label, field types, behaviors: from hook_field_formatter_info()
  *   * module: module that exposes the formatter type
-
+ *
  * fieldable types: array of hook_fieldable_info() results, keyed by entity_type.
  *   * name, id key, revision key, bundle key, cacheable, bundles: from
  *     hook_fieldable_info()
@@ -197,17 +197,6 @@ function _field_info_collate_fields($res
 }
 
 /**
- * @} End of "defgroup field_info"
- *
- * The rest of the functions in this file are not in a group, but
- * their automatically-generated autoloaders are (see field.autoload.inc).
- */
-
-/**
- * @autoload field_(?:behaviors|info)_.* field_info FieldException {
- */
-
-/**
  *  Helper function for determining the behavior of a field
  *  with respect to a given operation.
  *
@@ -222,7 +211,7 @@ function _field_info_collate_fields($res
  *    FIELD_BEHAVIOR_CUSTOM  - use the field's callback function.
  *    FIELD_BEHAVIOR_DEFAULT - use field.module default behavior.
  */
-function _field_behaviors_field($op, $field) {
+function al_field_behaviors_field($op, $field) {
   $info = field_info_field_types($field['type']);
   return isset($info['behaviors'][$op]) ? $info['behaviors'][$op] : FIELD_BEHAVIOR_DEFAULT;
 }
@@ -241,7 +230,7 @@ function _field_behaviors_field($op, $fi
  *    FIELD_BEHAVIOR_CUSTOM  - use the widget's callback function.
  *    FIELD_BEHAVIOR_DEFAULT - use field.module default behavior.
  */
-function _field_behaviors_widget($op, $instance) {
+function al_field_behaviors_widget($op, $instance) {
   $info = field_info_widget_types($instance['widget']['type']);
   return isset($info['behaviors'][$op]) ? $info['behaviors'][$op] : FIELD_BEHAVIOR_DEFAULT;
 }
@@ -260,7 +249,7 @@ function _field_behaviors_widget($op, $i
  *    FIELD_BEHAVIOR_CUSTOM  - use the formatter's callback function.
  *    FIELD_BEHAVIOR_DEFAULT - use field module default behavior.
  */
-function _field_behaviors_formatter($op, $display) {
+function al_field_behaviors_formatter($op, $display) {
   $info = field_info_formatter_types($display['type']);
   return isset($info['behaviors'][$op]) ? $info['behaviors'][$op] : FIELD_BEHAVIOR_DEFAULT;
 }
@@ -275,7 +264,7 @@ function _field_behaviors_formatter($op,
  *   Either a field type description, as provided by hook_field_info(), or an
  *   array of all existing field types, keyed by field type name.
  */
-function _field_info_field_types($field_type = NULL) {
+function al_field_info_field_types($field_type = NULL) {
   $info = _field_info_collate_types();
   $field_types = $info['field types'];
   if ($field_type) {
@@ -299,7 +288,7 @@ function _field_info_field_types($field_
  *   hook_field_widget_info(), or an array of all existing widget
  *   types, keyed by widget type name.
  */
-function _field_info_widget_types($widget_type = NULL) {
+function al_field_info_widget_types($widget_type = NULL) {
   $info = _field_info_collate_types();
   $widget_types = $info['widget types'];
   if ($widget_type) {
@@ -322,7 +311,7 @@ function _field_info_widget_types($widge
  *   Either a formatter type description, as provided by hook_field_formatter_info(),
  *   or an array of all existing widget types, keyed by widget type name.
  */
-function _field_info_formatter_types($formatter_type = NULL) {
+function al_field_info_formatter_types($formatter_type = NULL) {
   $info = _field_info_collate_types();
   $formatter_types = $info['formatter types'];
   if ($formatter_type) {
@@ -345,7 +334,7 @@ function _field_info_formatter_types($fo
  *   Either a fieldable type description, as provided by hook_fieldable_info(),
  *   or an array of all existing fieldable types, keyed by fieldable type name.
  */
-function _field_info_fieldable_types($obj_type = NULL) {
+function al_field_info_fieldable_types($obj_type = NULL) {
   $info = _field_info_collate_types();
   $fieldable_types = $info['fieldable types'];
   if ($obj_type) {
@@ -362,7 +351,7 @@ function _field_info_fieldable_types($ob
  * Return an array of fieldable bundle names and labels, for an individual
  * object type or for all object types.
  */
-function _field_info_bundles($obj_type = NULL) {
+function al_field_info_bundles($obj_type = NULL) {
   $info = _field_info_collate_types();
   $bundles = array();
   foreach ($info['fieldable types'] as $type => $fieldable_info) {
@@ -378,7 +367,7 @@ function _field_info_bundles($obj_type =
  * // TODO : might not be needed depending on how we solve
  * // the 'namespace bundle names' issue
  */
-function _field_info_bundle_entity($bundle) {
+function al_field_info_bundle_entity($bundle) {
   $info = _field_info_collate_types();
   foreach ($info['fieldable types'] as $type => $fieldable_info) {
     if (isset($fieldable_info['bundles'][$bundle])) {
@@ -396,7 +385,7 @@ function _field_info_bundle_entity($bund
  *   property, bundles, which is an array of all the bundles to which
  *   this field belongs.
  */
-function _field_info_fields() {
+function al_field_info_fields() {
   $info = _field_info_collate_fields();
   return $info['fields'];
 }
@@ -411,7 +400,7 @@ function _field_info_fields() {
  *   property, bundles, which is an array of all the bundles to which
  *   this field belongs.
  */
-function _field_info_field($field_name) {
+function al_field_info_field($field_name) {
   $info = _field_info_collate_fields();
   if (isset($info['fields'][$field_name])) {
     return $info['fields'][$field_name];
@@ -425,7 +414,7 @@ function _field_info_field($field_name) 
  * @param $bundle_name
  *   If set, return information on just this bundle.
  */
-function _field_info_instances($bundle_name = NULL) {
+function al_field_info_instances($bundle_name = NULL) {
   $info = _field_info_collate_fields();
   if (!isset($bundle_name)) {
     return $info['instances'];
@@ -439,7 +428,7 @@ function _field_info_instances($bundle_n
 /**
  * Return an array of instance data for a specific field and bundle.
  */
-function _field_info_instance($field_name, $bundle_name) {
+function al_field_info_instance($field_name, $bundle_name) {
   $info = _field_info_collate_fields();
   if (isset($info['instances'][$bundle_name][$field_name])) {
     return $info['instances'][$bundle_name][$field_name];
@@ -455,7 +444,7 @@ function _field_info_instance($field_nam
  *   The field type's default settings, as provided by hook_field_info(), or an
  *   empty array.
  */
-function _field_info_field_settings($type) {
+function al_field_info_field_settings($type) {
   $info = field_info_field_types($type);
   return isset($info['settings']) ? $info['settings'] : array();
 }
@@ -469,7 +458,7 @@ function _field_info_field_settings($typ
  *   The field type's default instance settings, as provided by
  *   hook_field_info(), or an empty array.
  */
-function _field_info_instance_settings($type) {
+function al_field_info_instance_settings($type) {
   $info = field_info_field_types($type);
   return isset($info['instance_settings']) ? $info['instance_settings'] : array();
 }
@@ -483,7 +472,7 @@ function _field_info_instance_settings($
  *   The field type's default settings, as provided by hook_field_info(), or an
  *   empty array.
  */
-function _field_info_widget_settings($type) {
+function al_field_info_widget_settings($type) {
   $info = field_info_widget_types($type);
   return isset($info['settings']) ? $info['settings'] : array();
 }
@@ -497,11 +486,15 @@ function _field_info_widget_settings($ty
  *   The field formatter's default settings, as provided by
  *   hook_field_info(), or an empty array.
  */
-function _field_info_formatter_settings($type) {
+function al_field_info_formatter_settings($type) {
   $info = field_info_formatter_types($type);
   return isset($info['settings']) ? $info['settings'] : array();
 }
 
 /**
- * @autoload} End of "@autoload field_info"
+ * @} End of "defgroup field_info"
+ *
+ * The rest of the functions in this file are not in a group, but
+ * their automatically-generated autoloaders are (see field.autoload.inc).
  */
+
Index: modules/field/field.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.module,v
retrieving revision 1.11
diff -u -F^[fc] -r1.11 field.module
--- modules/field/field.module	2 Jun 2009 07:02:17 -0000	1.11
+++ modules/field/field.module	4 Jun 2009 21:45:52 -0000
@@ -6,11 +6,9 @@
  */
 
 /*
- * Load all Field API functions, either directly or via an
- * autoloader.  We can't do this during hook_init() because it isn't
- * run during update.php.
+ * Load all public Field API functions via an autoloader.  We can't do
+ * this during hook_init() because it isn't run during update.php.
  */
-require(DRUPAL_ROOT . '/modules/field/field.crud.inc');
 require(DRUPAL_ROOT . '/modules/field/field.autoload.inc');
 
 /**
Index: scripts/generate-autoload.sh
===================================================================
RCS file: scripts/generate-autoload.sh
diff -N scripts/generate-autoload.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ scripts/generate-autoload.sh	4 Jun 2009 21:45:52 -0000
@@ -0,0 +1,117 @@
+<?php
+    
+/**
+ * Usage: xargs php scripts/generate-autoload.sh files ... > autoload.inc
+ *
+ * Generate function autoloaders for autoloaded functions in all the
+ * listed files.  This script must be run from the Drupal root, and the
+ * files must be specified as paths relative to Drupal root.  The
+ * autoloaders are written to standard output and are of the form:
+ *
+ * /**
+ *  * PHPdoc (not required)
+ *  * /
+ * function funcname(&$arg1, $arg2 = DEFAULT, ...) {
+ *   require_once DRUPAL_ROOT . '/modules/modulename/modulename.foo.inc';
+ *   return al_funcname($arg1, $arg, ...);
+ * }
+ *
+ * Autoloaders are generated for any function name that is in a @defgroup
+ * and begins with "al_".  The autoloader functions will have the same name
+ * as the autoloadee functions but without the al_ prefix.
+ */
+
+# Match @defgroup blocks.
+$defgroup_re = "|
+  ^/\*\*\s*\n                           # start PHPdoc
+  ^\s*\*\s+@defgroup\s+(\w+).*?\n       # @defgroup ingroup directive
+  ^\s*\*/\s*\n                          # end of PHPdoc
+  (.*?)                                 # anything, to the first...
+  ^/\*\*\s*\n                           # start PHPdoc
+  ^\s*\*\s+@\}.*?\n                     # @} directive
+  ^\s*\*/\s*\n                          # end of PHPdoc
+|xms";
+
+# Match function definitions with preceeding documentation.
+$func_re = "|
+  (?:(/\*\*\s*\n                        # start PHPdoc
+  .*?                                   # any minimal number of lines
+  \s*\*/\s*\n))                         # end of PHPdoc
+  ^function\s+(.*?)(\(.*?\))            # function signature
+|xms";
+
+# Start the output with an introduction.
+$output = "<?php
+// \$Id\$
+
+/**
+ * DO NOT EDIT THIS FILE.  It contains autoloading functions generated
+ * automatically by generate-autoload.pl.  The function names,
+ * arguments, and PHPdoc are copied from the file that defines the
+ * underlying function. To edit them, edit the underlying file instead.
+ */
+";
+
+$script = basename(array_shift($_SERVER['argv']));
+
+// Process each file on the command line.
+while ($file = array_shift($_SERVER['argv'])) {
+  if (preg_match('@[~#]@', $file)) {
+    continue;
+  }
+
+  $body = file_get_contents($file);
+  $body = str_replace("\r", '', $body);
+
+  // Find @defgroup blocks.
+  preg_match_all($defgroup_re, $body, $body_matches, PREG_SET_ORDER);
+  foreach ($body_matches as $body_match) {
+    list($dummy, $ingroup, $group) = $body_match;
+
+    // Find function definitions within the block.
+    $block = '';
+    preg_match_all($func_re, $group, $group_matches, PREG_SET_ORDER);
+    foreach ($group_matches as $group_match) {
+	    list($dummy, $doc, $func, $func_args) = $group_match;
+      // Skip non-autloaded functions.
+      if (! preg_match('@^al_(.*)@', $func, $m)) {
+        continue;
+      }
+      $func = $m[1];
+
+	    // Construct the autoloader function block from the autoloaded
+	    // function block.
+	    $pass_args = $func_args;
+	    // remove &'s from passed arguments
+	    $pass_args = str_replace('&', '', $pass_args);
+	    // remove default values from passed arguments
+	    $pass_args = preg_replace('@\s*=.*?(?=[,\)])@', '', $pass_args);
+	    // add a link to the autoloaded function
+	    $doc = preg_replace('@(\s*)\*/@', "\\1*\\1* This function is an autoloader for al_${func}() in $file.\\1*/", $doc);
+	    // $doc contains a leading and trailing newline.
+	    // $pass_args is wrapped in parens
+	    $block .= "
+${doc}function $func$func_args {
+  require_once DRUPAL_ROOT . '/$file';
+  return al_$func$pass_args;
+}
+";
+    }
+
+    // Output all functions for the block, if any.
+    if ($block && $ingroup) {
+	    $output .="
+/**
+ * @ingroup $ingroup
+ * @{
+ */
+$block
+/**
+ * @} End of \"$ingroup\"
+ */
+";
+	}
+    }
+}
+
+print $output;
