From: Stefan Monnier Date: Tue, 11 Jun 2013 21:53:40 +0000 (-0400) Subject: * lisp/subr.el (function-arity): Remove (mistakenly added). X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2016^2~145^2~16 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a3eb0c6e482e35a6ed0f51f2c8453ddc5b0fbd5;p=emacs.git * lisp/subr.el (function-arity): Remove (mistakenly added). Fixes: debbugs:14590 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3bfd46028c7..ddb0d0badc2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2013-06-11 Stefan Monnier + * subr.el (function-arity): Remove (mistakenly added) (bug#14590). + * progmodes/prolog.el (prolog-make-keywords-regexp): Remove. (prolog-font-lock-keywords): Use regexp-opt instead. Don't manually highlight strings. diff --git a/lisp/subr.el b/lisp/subr.el index fe9de835f71..8f290f356da 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4234,32 +4234,6 @@ use `called-interactively-p'." (declare (obsolete called-interactively-p "23.2")) (called-interactively-p 'interactive)) -(defun function-arity (f &optional num) - "Return the (MIN . MAX) arity of F. -If the maximum arity is infinite, MAX is `many'. -F can be a function or a macro. -If NUM is non-nil, return non-nil iff F can be called with NUM args." - (if (symbolp f) (setq f (indirect-function f))) - (if (eq (car-safe f) 'macro) (setq f (cdr f))) - (let ((res - (if (subrp f) - (let ((x (subr-arity f))) - (if (eq (cdr x) 'unevalled) (cons (car x) 'many))) - (let* ((args (if (consp f) (cadr f) (aref f 0))) - (max (length args)) - (opt (memq '&optional args)) - (rest (memq '&rest args)) - (min (- max (length opt)))) - (if opt - (cons min (if rest 'many (1- max))) - (if rest - (cons (- max (length rest)) 'many) - (cons min max))))))) - (if (not num) - res - (and (>= num (car res)) - (or (eq 'many (cdr res)) (<= num (cdr res))))))) - (defun set-temporary-overlay-map (map &optional keep-pred) "Set MAP as a temporary keymap taking precedence over most other keymaps. Note that this does NOT take precedence over the \"overriding\" maps