Index: includes/form.inc
===================================================================
RCS file: /Users/wright/drupal/local_repo/drupal/includes/form.inc,v
retrieving revision 1.426
diff -u -p -r1.426 form.inc
--- includes/form.inc	8 Jan 2010 06:36:34 -0000	1.426
+++ includes/form.inc	14 Jan 2010 23:54:26 -0000
@@ -747,13 +747,20 @@ function drupal_prepare_form($form_id, &
     }
   }
 
-  // Invoke hook_form_FORM_ID_alter() implementations.
+  // Invoke hook_form_FORM_ID_alter() implementations. We do these first so
+  // that the generic alter implementations can override things across all
+  // specific alterations if they need to.
   drupal_alter('form_' . $form_id, $form, $form_state);
 
-  // Invoke hook_form_alter() implementations.
+  // Invoke generic hook_form_alter() implementations.
   drupal_alter('form', $form, $form_state, $form_id);
-}
 
+  // Invoke hook_form_FORM_ID_post_alter() implementations. We need to invoke
+  // these alter functions after the generic ones so that if someone needs
+  // to alter a specific form, they can alter everything about that form, even
+  // elements (like taxonomy) that are added by the generic form_alter() hooks.
+  drupal_alter('form_' . $form_id . '_post', $form, $form_state);
+}
 
 /**
  * Validates user-submitted form data from the $form_state using
Index: modules/system/system.api.php
===================================================================
RCS file: /Users/wright/drupal/local_repo/drupal/modules/system/system.api.php,v
retrieving revision 1.120
diff -u -p -r1.120 system.api.php
--- modules/system/system.api.php	13 Jan 2010 06:26:49 -0000	1.120
+++ modules/system/system.api.php	15 Jan 2010 00:00:57 -0000
@@ -684,7 +684,9 @@ function hook_page_alter(&$page) {
  * altering a node form, the node object retrieved at from $form['#node'].
  *
  * Note that instead of hook_form_alter(), which is called for all forms, you
- * can also use hook_form_FORM_ID_alter() to alter a specific form.
+ * can also use hook_form_FORM_ID_alter() to alter a specific form, or
+ * hook_form_FORM_ID_post_alter() to alter a specific form after all the
+ * generic and specific modifications have been made.
  *
  * @param $form
  *   Nested array of form elements that comprise the form.
@@ -713,8 +715,8 @@ function hook_form_alter(&$form, &$form_
  * using long switch statements to alter multiple forms.
  *
  * Note that this hook fires before hook_form_alter(). Therefore all
- * implementations of hook_form_FORM_ID_alter() will run before all implementations
- * of hook_form_alter(), regardless of the module order.
+ * implementations of hook_form_FORM_ID_alter() will run before all
+ * implementations of hook_form_alter(), regardless of the module order.
  *
  * @param $form
  *   Nested array of form elements that comprise the form.
@@ -737,6 +739,39 @@ function hook_form_FORM_ID_alter(&$form,
 }
 
 /**
+ * Provide a form-specific alteration after the global hook_form_alter().
+ *
+ * Modules can implement hook_form_FORM_ID_post_alter() to modify a specific
+ * form, rather than implementing hook_form_alter() and checking the form ID,
+ * or using long switch statements to alter multiple forms.
+ *
+ * Note that this hook fires after hook_form_FORM_ID_alter() and
+ * hook_form_alter(). Therefore all implementations of
+ * hook_form_FORM_ID_post_alter() will run after all implementations of
+ * hook_form_FORM_ID_alter() and hook_form_alter(), regardless of the module
+ * order. This allows final alterations to modify the entire altered form
+ * structure once all other modules have had their chance to change the form.
+ *
+ * @param $form
+ *   Nested array of form elements that comprise the form.
+ * @param $form_state
+ *   A keyed array containing the current state of the form.
+ *
+ * @see hook_form_alter().
+ * @see drupal_prepare_form().
+ */
+function hook_form_FORM_ID_post_alter(&$form, &$form_state) {
+  // Modification for the form with the given form ID goes here. For example,
+  // if FORM_ID is "user_register_form" this code would run only on the user
+  // registration form.
+
+  // Completely hide all the taxonomy elements for a specific vocabulary on
+  // one form.
+  $vid = get_the_special_vocabulary_id_to_hide();
+  unset($form['taxonomy'][$vid]);
+}
+
+/**
  * Allow themes to alter the theme-specific settings form.
  *
  * With this hook, themes can alter the theme-specific settings form in any way
