diff options
| author | Stefan Monnier | 2013-06-11 17:53:40 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-06-11 17:53:40 -0400 |
| commit | 5a3eb0c6e482e35a6ed0f51f2c8453ddc5b0fbd5 (patch) | |
| tree | 9dda036eca8b1f4816e4e35a02e204525b82f083 | |
| parent | e3eb1bb7d954183f107c406b69c9e5597203d70e (diff) | |
| download | emacs-5a3eb0c6e482e35a6ed0f51f2c8453ddc5b0fbd5.tar.gz emacs-5a3eb0c6e482e35a6ed0f51f2c8453ddc5b0fbd5.zip | |
* lisp/subr.el (function-arity): Remove (mistakenly added).
Fixes: debbugs:14590
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 26 |
2 files changed, 2 insertions, 26 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3bfd46028c7..ddb0d0badc2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2013-06-11 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2013-06-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * subr.el (function-arity): Remove (mistakenly added) (bug#14590). | ||
| 4 | |||
| 3 | * progmodes/prolog.el (prolog-make-keywords-regexp): Remove. | 5 | * progmodes/prolog.el (prolog-make-keywords-regexp): Remove. |
| 4 | (prolog-font-lock-keywords): Use regexp-opt instead. | 6 | (prolog-font-lock-keywords): Use regexp-opt instead. |
| 5 | Don't manually highlight strings. | 7 | 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'." | |||
| 4234 | (declare (obsolete called-interactively-p "23.2")) | 4234 | (declare (obsolete called-interactively-p "23.2")) |
| 4235 | (called-interactively-p 'interactive)) | 4235 | (called-interactively-p 'interactive)) |
| 4236 | 4236 | ||
| 4237 | (defun function-arity (f &optional num) | ||
| 4238 | "Return the (MIN . MAX) arity of F. | ||
| 4239 | If the maximum arity is infinite, MAX is `many'. | ||
| 4240 | F can be a function or a macro. | ||
| 4241 | If NUM is non-nil, return non-nil iff F can be called with NUM args." | ||
| 4242 | (if (symbolp f) (setq f (indirect-function f))) | ||
| 4243 | (if (eq (car-safe f) 'macro) (setq f (cdr f))) | ||
| 4244 | (let ((res | ||
| 4245 | (if (subrp f) | ||
| 4246 | (let ((x (subr-arity f))) | ||
| 4247 | (if (eq (cdr x) 'unevalled) (cons (car x) 'many))) | ||
| 4248 | (let* ((args (if (consp f) (cadr f) (aref f 0))) | ||
| 4249 | (max (length args)) | ||
| 4250 | (opt (memq '&optional args)) | ||
| 4251 | (rest (memq '&rest args)) | ||
| 4252 | (min (- max (length opt)))) | ||
| 4253 | (if opt | ||
| 4254 | (cons min (if rest 'many (1- max))) | ||
| 4255 | (if rest | ||
| 4256 | (cons (- max (length rest)) 'many) | ||
| 4257 | (cons min max))))))) | ||
| 4258 | (if (not num) | ||
| 4259 | res | ||
| 4260 | (and (>= num (car res)) | ||
| 4261 | (or (eq 'many (cdr res)) (<= num (cdr res))))))) | ||
| 4262 | |||
| 4263 | (defun set-temporary-overlay-map (map &optional keep-pred) | 4237 | (defun set-temporary-overlay-map (map &optional keep-pred) |
| 4264 | "Set MAP as a temporary keymap taking precedence over most other keymaps. | 4238 | "Set MAP as a temporary keymap taking precedence over most other keymaps. |
| 4265 | Note that this does NOT take precedence over the \"overriding\" maps | 4239 | Note that this does NOT take precedence over the \"overriding\" maps |