(Fconcord_genre_ds): Use Vchise_system_db_directory as the default
authortomo <tomo>
Tue, 16 Nov 2010 04:09:48 +0000 (04:09 +0000)
committertomo <tomo>
Tue, 16 Nov 2010 04:09:48 +0000 (04:09 +0000)
location of data-source.
(complex_vars_of_concord): Use Vchise_system_db_directory to assign
genre `character' and `feature'.

src/concord.c

index e368006..fff4b5c 100644 (file)
@@ -264,6 +264,8 @@ Return concord-ds of GENRE.
   CHECK_SYMBOL (genre);
 
   retval = Fgethash (genre, Vconcord_genre_hash_table, Qunbound);
+  if ( UNBOUNDP (retval) )
+    retval = Vchise_system_db_directory;
   if ( STRINGP (retval) )
     {
       retval = Fconcord_open_ds (retval, Qnil, Qnil, Qnil);
@@ -1171,9 +1173,7 @@ void
 complex_vars_of_concord (void)
 {
 #ifdef HAVE_LIBCHISE
-  Lisp_Object dir = build_string(chise_system_db_dir);
-
-  Fconcord_assign_genre (Qcharacter, dir);
-  Fconcord_assign_genre (Qfeature, dir);
+  Fconcord_assign_genre (Qcharacter, Vchise_system_db_directory);
+  Fconcord_assign_genre (Qfeature, Vchise_system_db_directory);
 #endif
 }