From: tomo Date: Tue, 7 Feb 2006 06:24:17 +0000 (+0000) Subject: (struct closure_for_each_object): Add new member `ret'. X-Git-Tag: chise-base-0_23^20~161 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=40ff0c5fb7867c7a177fdb3c25a06b8b95a97bf8;p=chise%2Fxemacs-chise.git (struct closure_for_each_object): Add new member `ret'. (func_for_each_object): Setup the return value to `for_each_object_closure->ret'. (Fconcord_foreach_object_in_feature): If FUNCTION returns non-nil, returns the value instead of Qt. --- diff --git a/src/concord.c b/src/concord.c index 47bf866..e916e27 100644 --- a/src/concord.c +++ b/src/concord.c @@ -595,6 +595,7 @@ struct closure_for_each_object Lisp_Object function; Lisp_Object genre; Lisp_Object ds; + Lisp_Object ret; } *for_each_object_closure; static int @@ -628,6 +629,7 @@ func_for_each_object (CONCORD_String object_id, Qnil, Qnil)); #endif ret = call2 (for_each_object_closure->function, obj, val); + for_each_object_closure->ret = ret; return !NILP (ret); } @@ -673,8 +675,10 @@ When the FUNCTION returns non-nil, it breaks the repeat. for_each_object_closure->function = function; for_each_object_closure->genre = genre; for_each_object_closure->ds = ds; + for_each_object_closure->ret = Qnil; concord_feature_foreach_obj_string (c_feature, func_for_each_object); - return Qt; + /* return Qt; */ + return for_each_object_closure->ret; } void