>> In practice, it's simpler to just do
>> (condition-case nil
>> (fooo)
>> (wrong-number-of-arguments
>> (bar)))
>> It's not perfect, but I've found it to suffer from fewer problems than
>> other solutions. It's also faster.
> Good idea!
> Why is there not such a function in the Emacs core?
The example code above shows there *is* such a functionality. If you mean
"why is there no `function-can-accept-N-args' function", then the answer is
probably that most people ask for the inconvenient "function-arity" instead
and get turned down.
> It seems such an incredibly useful function, say for debuggers or
> code-analysers, or for the uses mentioned above. Did somebody just
> overlook it in the early days, perhaps?
Seeing how this kind of thing is basically never used, and how the specific
info needed tends to be subtly different each time, I guess it's not just
an overlook, but a lack of clear evidence of a need.
Stefan
_______________________________________________
Help-gnu-emacs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs