>>>> "GE" == Gunnar Evermann
<ge204(a)eng.cam.ac.uk> writes:
GE> 2000-08-06 Gunnar Evermann <ge204(a)eng.cam.ac.uk>
GE> * eval.c (function_argcount): If function needs to be autoloaded
GE> actually use the loaded definition.
Gunnar, thanks for the fix. I take the blame for this bug.
Gunnar, you might want to audit all calls to do_autoload for similar
problems.
I did a micro-audit myself, and have these micro-improvements to show
for it:
(Vin, don't bother for 21.1)
./src/ChangeLog:
2000-08-21 Martin Buchholz <martin(a)xemacs.org>
* data.c (indirect_function):
Rename ERRORP to non-misleading VOID_FUNCTION_ERRORP.
* eval.c (function_argcount):
Use original function when signaling errors.
Index: ./src/data.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/data.c,v
retrieving revision 1.24.2.20
diff -u -w -r1.24.2.20 data.c
--- data.c 2000/07/21 10:15:53 1.24.2.20
+++ data.c 2000/08/21 08:42:03
@@ -644,10 +644,11 @@
return it. If there is a cycle in the function chain, signal a
cyclic-function-indirection error.
- This is like Findirect_function, except that it doesn't signal an
- error if the chain ends up unbound. */
+ This is like Findirect_function when VOID_FUNCTION_ERRORP is true.
+ When VOID_FUNCTION_ERRORP is false, no error is signaled if the end
+ of the chain ends up being Qunbound. */
Lisp_Object
-indirect_function (Lisp_Object object, int errorp)
+indirect_function (Lisp_Object object, int void_function_errorp)
{
#define FUNCTION_INDIRECTION_SUSPICION_LENGTH 16
Lisp_Object tortoise, hare;
@@ -665,7 +666,7 @@
return Fsignal (Qcyclic_function_indirection, list1 (object));
}
- if (errorp && UNBOUNDP (hare))
+ if (void_function_errorp && UNBOUNDP (hare))
return signal_void_function_error (object);
return hare;
Index: ./src/eval.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/eval.c,v
retrieving revision 1.27.2.30
diff -u -w -r1.27.2.30 eval.c
--- eval.c 2000/08/21 07:18:02 1.27.2.30
+++ eval.c 2000/08/21 08:42:07
@@ -3670,7 +3670,7 @@
else
{
invalid_function:
- return signal_invalid_function_error (function);
+ return signal_invalid_function_error (orig_function);
}
{