(U-0002195D): Add `ideographic-structure'; add `sound@ja/on'; add
[chise/xemacs-chise.git.1] / src / concord.c
index 7f06ae3..7b1b9cc 100644 (file)
@@ -249,8 +249,10 @@ Return concord-ds of GENRE.
   CHECK_SYMBOL (genre);
 
   retval = Fgethash (genre, Vconcord_genre_hash_table, Qunbound);
+#ifdef HAVE_LIBCHISE
   if ( UNBOUNDP (retval) )
     retval = Vchise_system_db_directory;
+#endif
   if ( STRINGP (retval) )
     {
       retval = Fconcord_open_ds (retval, Qnil, Qnil, Qnil);
@@ -771,7 +773,7 @@ Store a VALUE of OBJECT's FEATURE.
              ffv = Fconcord_object_get (ret, rev_feature);
              if (!CONSP (ffv))
                concord_object_put (ret, rev_feature, list1 (object));
-             else if (NILP (Fmemq (object, ffv)))
+             else if (NILP (Fmember (object, ffv)))
                concord_object_put
                  (ret, rev_feature,
                   nconc2 (Fcopy_sequence (ffv), list1 (object)));
@@ -784,6 +786,30 @@ Store a VALUE of OBJECT's FEATURE.
   return Qt;
 }
 
+DEFUN ("concord-object-adjoin", Fconcord_object_adjoin, 3, 3, 0, /*
+Cons ITEM onto the front of FEATURE's value of OBJECT only if it's not already there.
+*/
+       (object, feature, item))
+{
+  Lisp_Object ret = Fconcord_object_get (object, feature);
+
+  if ( NILP (Fmember (item, ret)) )
+    return Fconcord_object_put (object, feature, Fcons (item, ret));
+  return Qnil;
+}
+
+DEFUN ("concord-object-adjoin*", Fconcord_object_adjoinX, 3, 3, 0, /*
+Append ITEM onto the end of FEATURE's value of OBJECT only if it's not already there.
+*/
+       (object, feature, item))
+{
+  Lisp_Object ret = Fconcord_object_get (object, feature);
+
+  if ( NILP (Fmember (item, ret)) )
+    return Fconcord_object_put (object, feature, nconc2 (ret, list1 (item)));
+  return Qnil;
+}
+
 struct closure_for_object_spec
 {
   char* object_id;
@@ -1110,6 +1136,8 @@ syms_of_concord (void)
   DEFSUBR (Fconcord_decode_object);
   DEFSUBR (Fconcord_object_get);
   DEFSUBR (Fconcord_object_put);
+  DEFSUBR (Fconcord_object_adjoin);
+  DEFSUBR (Fconcord_object_adjoinX);
   DEFSUBR (Fconcord_define_object);
   DEFSUBR (Fconcord_object_spec);
   DEFSUBR (Fconcord_foreach_object_in_feature);