emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/compat 2d50e5c 32/99: Implement func-arity


From: ELPA Syncer
Subject: [elpa] externals/compat 2d50e5c 32/99: Implement func-arity
Date: Sun, 17 Oct 2021 05:57:52 -0400 (EDT)

branch: externals/compat
commit 2d50e5ce5ef422069e5bed6fb5eaea96b45e7a35
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Implement func-arity
---
 compat-26.1.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/compat-26.1.el b/compat-26.1.el
index 9131710..90e07bf 100644
--- a/compat-26.1.el
+++ b/compat-26.1.el
@@ -28,8 +28,19 @@
 ;;; Code:
 
 (eval-when-compile (require 'compat-macs))
+(declare-function compat-func-arity "compat" (func))
 (declare-function compat-maxargs-/= "compat" (func n))
 
+;;;; Defined in eval.c
+
+(compat-defun func-arity (func)
+  "Return minimum and maximum number of args allowed for FUNC.
+FUNC must be a function of some kind.
+The returned value is a cons cell (MIN . MAX).  MIN is the minimum number
+of args.  MAX is the maximum number, or the symbol ‘many’, for a
+function with ‘&rest’ args, or ‘unevalled’ for a special form."
+  (compat-func-arity func))
+
 ;;;; Defined in fns.c
 
 (compat-advise assoc (key alist &optional testfn)



reply via email to

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