=== modified file 'sites/all/modules/hierarchical_select/modules/hs_taxonomy.module'
--- modules/hs_taxonomy.module	2011-04-22 14:33:43 +0000
+++ modules/hs_taxonomy.module	2011-04-24 13:15:54 +0000
@@ -634,13 +634,8 @@ function hs_taxonomy_token_values($type,
         return $values;
       }
 
-      // Find out which vocabularies are using Hierarchical Select.
       if (!isset($hs_vids)) {
-        $hs_vids = array();
-        $result = db_query("SELECT SUBSTRING(name, 30, 3) AS vid FROM {variable} WHERE name LIKE 'taxonomy_hierarchical_select_%' AND value LIKE 'i:1\;';");
-        while ($o = db_fetch_object($result)) {
-          $hs_vids[] = $o->vid;
-        }
+        $hs_vids = hs_taxonomy_active_vids();
       }
 
       // Get a list of all existent vids, so we can generate an empty token
@@ -705,12 +700,24 @@ function hs_taxonomy_token_values($type,
  */
 function hs_taxonomy_token_list($type = 'all') {
   if ($type == 'node' || $type == 'all') {
-    $tokens['node']['save-lineage-termpath'] = t('Only use when you have enabled the "save lineage" setting of Hierarchical Select. Will show the term\'s parent terms separated by /.');
-    $tokens['node']['save-lineage-termpath-raw'] = t('As [save-linage-termpath]. WARNING - raw user input.');
-
-    $tokens['node']['save-lineage-termpath:vid'] = t('Only has output when terms are present for the vocabulary with the specified vid. Only use when you have enabled the "save lineage" setting of Hierarchical Select. Will show the term\'s parent terms separated by /.');
-    $tokens['node']['save-lineage-termpath-raw:vid'] = t('Only has output when terms are present for the vocabulary with the specified vid. As [save-linage-termpath]. WARNING - raw user input.');
-
+    $sep = variable_get('hs_taxonomy_separator', '*undef*');
+    if ($sep !== '*undef*') {
+      $description = "'" . $sep . "' " . t('(as defined by the hs_taxonomy_separator variable)');
+    }
+    else {
+      $description = "'" . variable_get('pathauto_separator', '-') . "' " . t('(as defined by pathauto settings)');
+    }
+    $tokens['node']['save-lineage-termpath'] = t('Only use when you have enabled the "save lineage" setting of Hierarchical Select. Will show the term\'s parent terms separated by @sep.',
+        array('@sep' => $description));
+    $tokens['node']['save-lineage-termpath-raw'] = t('As @token. WARNING - raw user input.', array('@token' => '[save-linage-termpath]'));
+
+    // 'save-lineage-termpath:vid' will not validate anymore since pathauto 6.x-1.4.
+    // Just output a list of individual tokens. List only the tokens which will
+    // generate a non-empty value, for brevity.
+    foreach (hs_taxonomy_active_vids() as $vid) {
+      $tokens['node']['save-lineage-termpath:' . $vid] = t('As @token; only has output when terms are present for the vocabulary with the specified vid.', array('@token' => '[save-linage-termpath]'));
+      $tokens['node']['save-lineage-termpath-raw:' . $vid] = t('As @token. WARNING - raw user input.', array('@token' => '[save-linage-termpath:' . $vid . ']'));
+    }
     return $tokens;
   }
 }
@@ -803,6 +810,18 @@ function hierarchical_select_taxonomy_fo
 // Private functions.
 
 /**
+ * Get the vocabularies which are using Hierarchical Select.
+ */
+function hs_taxonomy_active_vids() {
+  $hs_vids = array();
+  $result = db_query("SELECT SUBSTRING(name, 30, 3) AS vid FROM {variable} WHERE name LIKE 'taxonomy_hierarchical_select_%' AND value LIKE 'i:1\;';");
+  while ($o = db_fetch_object($result)) {
+    $hs_vids[] = $o->vid;
+  }
+  return $hs_vids;
+}
+
+/**
  * Drupal core's taxonomy_get_tree() doesn't allow us to reset the cached
  * trees, which obviously causes problems when you create new items between
  * two calls to it.

