--- pathauto.module	Thu Jan 15 01:14:12 1970
+++ pathauto.module	Thu Jan 15 01:14:12 1970
@@ -244,10 +244,16 @@
             $alias = pathauto_create_alias('node', $op, $placeholders, $src, $node->nid, $node->type, $node->language);
           }
         }
+
+        // Insert or update pathauto state for this node
+        pathauto_state_update($node->nid, $node->pathauto_perform_alias);
         break;
       case 'delete':
         path_set_alias('node/'. $node->nid);
         path_set_alias('node/'. $node->nid .'/feed');
+
+        // Delete pathauto state for this node
+        pathauto_state_delete($node->nid);
         break;
       default:
         break;
@@ -296,6 +302,20 @@
         '#weight' => -1,
       );
 
+      // Only affects saved node forms
+      if (!is_null($form['nid']['#value'])) {
+        // Look for existing state
+        $nid    = $form['nid']['#value'];
+        $state  = pathauto_state_read($nid);
+        if (FALSE !== $state) {
+          // Collapse pathauto fieldset if checked
+          $form['path']['#collapsed'] = ($state);
+
+          // Set checkbox
+          $form['path']['pathauto_perform_alias']['#default_value'] = ($state);
+        }
+      }
+
       if (!empty($node->pathauto_perform_alias) && !empty($node->old_alias) && $node->path == '') {
         $form['path']['path']['#default_value'] = $node->old_alias;
         $node->path = $node->old_alias;
@@ -433,3 +453,66 @@
       break;
   }
 }
+
+//==============================================================================
+// State related functions.
+
+/**
+ * Create pathauto state for this node
+ */
+function pathauto_state_create($nid, $state = 0) {
+  $result = db_query('
+    INSERT INTO {pathauto_state} (nid, state)
+    VALUES (%d, %d)
+  ',
+    intval($nid),
+    intval($state)
+  );
+}
+
+/**
+ * Delete pathauto state for this node
+ */
+function pathauto_state_delete($nid) {
+  db_query('
+    DELETE FROM {pathauto_state}
+    WHERE nid = %d
+  ',
+    intval($nid)
+  );
+}
+
+/**
+ * Read pathauto state for this node
+ */
+function pathauto_state_read($nid) {
+  $query = db_query('
+    SELECT state
+    FROM {pathauto_state}
+    WHERE nid = %d
+  ',
+    intval($nid)
+  );
+  $result = db_result($query);
+
+  return $result;
+}
+
+/**
+ * Update pathauto state for this node
+ */
+function pathauto_state_update($nid, $state = 0) {
+  $current_state = pathauto_state_read($nid);
+  if (!is_numeric($current_state)) {
+    pathauto_state_create($nid, $state);
+  } else {
+    $result = db_query('
+      UPDATE {pathauto_state}
+      SET state = %d
+      WHERE nid = %d
+    ',
+      intval($state),
+      intval($nid)
+    );
+  }
+}
\ No newline at end of file
--- pathauto.install	Thu Jan 15 01:14:12 1970
+++ pathauto.install	Thu Jan 15 01:14:12 1970
@@ -52,6 +52,9 @@
   // Set the weight to 1
   db_query("UPDATE {system} SET weight = 1 WHERE name = 'pathauto'");
 
+  // Create the table to track state
+  drupal_install_schema('pathauto_state');
+
   // Clear the cache to get these to take effect.
   cache_clear_all();
 }
@@ -62,10 +65,41 @@
 function pathauto_uninstall() {
   // Delete all the pathauto variables and then clear the variable cache
   db_query("DELETE FROM {variable} WHERE name LIKE 'pathauto_%'");
+
+  // Uninstall the state tracking table
+  drupal_uninstall_schema('pathauto_state');
+
   cache_clear_all('variables', 'cache');
 }
 
 /**
+ * Maintain state of the "Automatic alias" checkbox for each node
+ */
+function pathauto_state_schema() {
+  $schema['pathauto_state'] = array(
+    'description' => t('Maintain state of the "Automatic alias" checkbox for each node'),
+    'fields' => array(
+      'nid' => array(
+        'description' => t('Node ID'),
+        'type'        => 'int',
+        'unsigned'    => true,
+        'not null'    => true,
+      ),
+      'state' => array(
+        'description' => t('Automatic alias state'),
+        'type'        => 'int',
+        'size'        => 'tiny',
+        'unsigned'    => true,
+        'not null'    => true,
+        'default'     => 0,
+      ),
+    ),
+    'primary key' => array('nid'),
+  );
+  return $schema;
+}
+
+/**
  * Set the weight a little heavier to allow taxonomy to do its work.
  */
 function pathauto_update_1() {
@@ -104,6 +138,17 @@
   $ret = array();
   if (db_table_exists('url_alias_extra')) {
     db_drop_table($ret, 'url_alias_extra');
+  }
+  return $ret;
+}
+
+/**
+ * Create the table to track state
+ */
+function pathauto_update_8() {
+  $ret = array();
+  if (!db_table_exists('pathauto_state')) {
+    $ret[] = drupal_install_schema('pathauto_state');
   }
   return $ret;
 }
