diff options
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index fcac1fedd09..e8a8a977184 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | ;;; This version incorporates changes up to version 2.10 of the | 11 | ;;; This version incorporates changes up to version 2.10 of the |
| 12 | ;;; Zawinski-Furuseth compiler. | 12 | ;;; Zawinski-Furuseth compiler. |
| 13 | (defconst byte-compile-version "$Revision: 2.125 $") | 13 | (defconst byte-compile-version "$Revision: 2.126 $") |
| 14 | 14 | ||
| 15 | ;; This file is part of GNU Emacs. | 15 | ;; This file is part of GNU Emacs. |
| 16 | 16 | ||
| @@ -3566,9 +3566,13 @@ If FORM is a lambda or a macro, byte-compile it as a function." | |||
| 3566 | (byte-compile-set-symbol-position fun) | 3566 | (byte-compile-set-symbol-position fun) |
| 3567 | (when (or (> (length form) 4) | 3567 | (when (or (> (length form) 4) |
| 3568 | (and (eq fun 'defconst) (null (cddr form)))) | 3568 | (and (eq fun 'defconst) (null (cddr form)))) |
| 3569 | (byte-compile-warn | 3569 | (let ((ncall (length (cdr form)))) |
| 3570 | "%s called with %d arguments, but accepts only %s" | 3570 | (byte-compile-warn |
| 3571 | fun (length (cdr form)) "2-3")) | 3571 | "%s called with %d argument%s, but %s %s" |
| 3572 | fun ncall | ||
| 3573 | (if (= 1 ncall) "" "s") | ||
| 3574 | (if (< ncall 2) "requires" "accepts only") | ||
| 3575 | "2-3"))) | ||
| 3572 | (when (memq 'free-vars byte-compile-warnings) | 3576 | (when (memq 'free-vars byte-compile-warnings) |
| 3573 | (push var byte-compile-bound-variables) | 3577 | (push var byte-compile-bound-variables) |
| 3574 | (if (eq fun 'defconst) | 3578 | (if (eq fun 'defconst) |