[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/data.c
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/data.c |
Date: |
Fri, 10 Feb 2006 00:00:31 +0000 |
Index: emacs/src/data.c
diff -u emacs/src/data.c:1.260 emacs/src/data.c:1.261
--- emacs/src/data.c:1.260 Mon Feb 6 15:23:20 2006
+++ emacs/src/data.c Fri Feb 10 00:00:31 2006
@@ -1927,15 +1927,16 @@
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 optional arg NOERROR is nil, signal a void-function error if
+the final symbol is unbound. Otherwise, just return nil is unbound.
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 result;
@@ -1943,7 +1944,9 @@
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;
}