diff src/data.c @ 68758:13c1b7c5f555

* data.c (Findirect_function): Add NOERROR arg. All callers changed to pass Qnil for NOERROR. * keymap.c (current_minor_maps_error): Remove. (current_minor_maps): Pass Qt for NOERROR to Findirect_function instead of using internal_condition_case_1+current_minor_maps_error.
author Kim F. Storm <storm@cua.dk>
date Fri, 10 Feb 2006 00:00:31 +0000
parents 3bd95f4f2941
children eb6c6d7a4c7f
line wrap: on
line diff
--- a/src/data.c	Thu Feb 09 23:08:19 2006 +0000
+++ b/src/data.c	Fri Feb 10 00:00:31 2006 +0000
@@ -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;
 }