Mercurial > emacs
diff lisp/emacs-lisp/bytecomp.el @ 105057:12bb7892ba1d
(byte-compile-form): Always check the function arguments, whether or
not it has a handler.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 17 Sep 2009 07:29:43 +0000 |
parents | 8226adaf7c75 |
children | 507e3735eed8 |
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el Thu Sep 17 06:28:32 2009 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Thu Sep 17 07:29:43 2009 +0000 @@ -2980,6 +2980,12 @@ (memq bytecomp-fn byte-compile-interactive-only-functions) (byte-compile-warn "`%s' used from Lisp code\n\ That command is designed for interactive use only" bytecomp-fn)) + (when (byte-compile-warning-enabled-p 'callargs) + (if (memq bytecomp-fn + '(custom-declare-group custom-declare-variable + custom-declare-face)) + (byte-compile-nogroup-warn form)) + (byte-compile-callargs-warn form)) (if (and bytecomp-handler ;; Make sure that function exists. This is important ;; for CL compiler macros since the symbol may be @@ -2993,12 +2999,6 @@ (get (get bytecomp-fn 'byte-opcode) 'emacs19-opcode)))) (funcall bytecomp-handler form) - (when (byte-compile-warning-enabled-p 'callargs) - (if (memq bytecomp-fn - '(custom-declare-group custom-declare-variable - custom-declare-face)) - (byte-compile-nogroup-warn form)) - (byte-compile-callargs-warn form)) (byte-compile-normal-call form)) (if (byte-compile-warning-enabled-p 'cl-functions) (byte-compile-cl-warn form))))