|
From: | Michael Heerdegen |
Subject: | Re: Arbitrary function: find the number(s) of expected arguments |
Date: | Sat, 19 Mar 2016 14:54:10 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) |
Eli Zaretskii <address@hidden> writes: > Patches to add func-arity to Emacs are welcome. Question: Is this a reasonable way to go? Will `func-arity' be a good solution for the issues we discussed here? For example, if (defun f (a b) (list a b)) (defalias 'g (apply-partially #'f 1)) what would (func-arity 'g) return? Would that be useful? What would it return for adviced functions? An advice can change the arity of a function. Most do not, but most advices have an &rest args signature. Any function can be adviced. My question is if it is a good idea to invite users to rely on something like `func-arity'. Michael.
[Prev in Thread] | Current Thread | [Next in Thread] |