aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2003-04-21 15:48:28 +0000
committerStefan Monnier2003-04-21 15:48:28 +0000
commitd0e07261a2aaab0d38306ea0b753eb67fc729334 (patch)
treeb9b2f90e3e773017fcfd14e0ad282a0d3aa4daa4
parent620a294d497b2e9df759dac23b65a42a93c8ed9e (diff)
downloademacs-d0e07261a2aaab0d38306ea0b753eb67fc729334.tar.gz
emacs-d0e07261a2aaab0d38306ea0b753eb67fc729334.zip
(byte-compile-defvar): Improve message.
-rw-r--r--lisp/emacs-lisp/bytecomp.el12
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)