tem = call1 (predicate, value);
}
while (NILP (tem));
+ /* This function is marked as NO_RETURN, gcc would warn if it has a
+ return statement or if falls off the function. Other compilers
+ warn if no return statement is present. */
+#ifndef __GNUC__
return value;
+#else
+ abort ();
+#endif
}
void
return hare;
}
-DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 1, 0,
+DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 2, 0,
doc: /* Return the function at the end of OBJECT's function chain.
-If OBJECT is a symbol, follow all function indirections and return the final
-function binding.
-If OBJECT is not a symbol, just return it.
-Signal a void-function error if the final symbol is unbound.
+If OBJECT is not a symbol, just return it. Otherwise, follow all
+function indirections to find the final function binding and return it.
+If the final symbol in the chain is unbound, signal a void-function error.
+Optional arg NOERROR non-nil means to return nil instead of signalling.
Signal a cyclic-function-indirection error if there is a loop in the
function chain of symbols. */)
- (object)
+ (object, noerror)
register Lisp_Object object;
+ Lisp_Object noerror;
{
Lisp_Object result;
result = indirect_function (object);
if (EQ (result, Qunbound))
- return Fsignal (Qvoid_function, Fcons (object, Qnil));
+ return (NILP (noerror)
+ ? Fsignal (Qvoid_function, Fcons (object, Qnil))
+ : Qnil);
return result;
}
\f