emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arbitrary function: find the number(s) of expected arguments


From: Paul Pogonyshev
Subject: Re: Arbitrary function: find the number(s) of expected arguments
Date: Sat, 19 Mar 2016 17:51:39 +0100

Approximate patch, without documentation.  If this is accepted, I can write documentation too.  I submitted legal papers for FSF years ago.

    (func-arity 'car)                      (1 . 1)
    (func-arity 'caar)                     (1 . 1)
    (func-arity 'magit-log-all)            (0 . 2)
    (func-arity 'format)                   (1 . many)
    (func-arity (lambda (&rest x)))        (0 . many)

Return value is the same as with `subr-arity' except here any callable is accepted and you don't need `symbol-function' or `indirect-function'.  Autoloading is also supported transparently.

Paul

Attachment: func-arity.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]