diff options
author | Glenn Morris <rgm@gnu.org> | 2009-09-17 07:29:43 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2009-09-17 07:29:43 +0000 |
commit | 88d5190ca284a973930628e318e69461baa24610 (patch) | |
tree | 8116cd573c74a8954df66fc661fdeaefea7bc11c /lisp/emacs-lisp | |
parent | a8106aecf0be7a29024eb8c507f1f9968bb8bafa (diff) | |
download | emacs-88d5190ca284a973930628e318e69461baa24610.tar.gz emacs-88d5190ca284a973930628e318e69461baa24610.tar.bz2 emacs-88d5190ca284a973930628e318e69461baa24610.zip |
(byte-compile-form): Always check the function arguments, whether or
not it has a handler.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 34232fc6cb7..7903bf6a1d9 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2980,6 +2980,12 @@ If FORM is a lambda or a macro, byte-compile it as a function." (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 @@ That command is designed for interactive use only" bytecomp-fn)) (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)))) |