summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2003-04-21 15:48:28 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2003-04-21 15:48:28 +0000
commitd0e07261a2aaab0d38306ea0b753eb67fc729334 (patch)
treeb9b2f90e3e773017fcfd14e0ad282a0d3aa4daa4 /lisp/emacs-lisp/bytecomp.el
parent620a294d497b2e9df759dac23b65a42a93c8ed9e (diff)
downloademacs-d0e07261a2aaab0d38306ea0b753eb67fc729334.tar.gz
emacs-d0e07261a2aaab0d38306ea0b753eb67fc729334.tar.bz2
emacs-d0e07261a2aaab0d38306ea0b753eb67fc729334.zip
(byte-compile-defvar): Improve message.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-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 @@
;;; This version incorporates changes up to version 2.10 of the
;;; Zawinski-Furuseth compiler.
-(defconst byte-compile-version "$Revision: 2.125 $")
+(defconst byte-compile-version "$Revision: 2.126 $")
;; This file is part of GNU Emacs.
@@ -3566,9 +3566,13 @@ If FORM is a lambda or a macro, byte-compile it as a function."
(byte-compile-set-symbol-position fun)
(when (or (> (length form) 4)
(and (eq fun 'defconst) (null (cddr form))))
- (byte-compile-warn
- "%s called with %d arguments, but accepts only %s"
- fun (length (cdr form)) "2-3"))
+ (let ((ncall (length (cdr form))))
+ (byte-compile-warn
+ "%s called with %d argument%s, but %s %s"
+ fun ncall
+ (if (= 1 ncall) "" "s")
+ (if (< ncall 2) "requires" "accepts only")
+ "2-3")))
(when (memq 'free-vars byte-compile-warnings)
(push var byte-compile-bound-variables)
(if (eq fun 'defconst)