]> git.eshelyaron.com Git - emacs.git/commitdiff
(byte-compile-form): Always check the function arguments, whether or
authorGlenn Morris <rgm@gnu.org>
Thu, 17 Sep 2009 07:29:43 +0000 (07:29 +0000)
committerGlenn Morris <rgm@gnu.org>
Thu, 17 Sep 2009 07:29:43 +0000 (07:29 +0000)
not it has a handler.

lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el

index 9f958013f74426b904c2e7d2623f97554ea7f4f0..8c982559c48436e60acc7ea165c69ba7433c068b 100644 (file)
@@ -1,5 +1,8 @@
 2009-09-17  Glenn Morris  <rgm@gnu.org>
 
+       * emacs-lisp/bytecomp.el (byte-compile-form): Always check the function
+       arguments, whether or not it has a handler.
+
        * ansi-color.el (ansi-color-get-face-1): Fix typo in handler.
 
        * simple.el (hard-newline): Give it a doc-string.
index 34232fc6cb76ac82eb535a222191e67c375a347a..7903bf6a1d92c73cbbc0c2e0bcdcbc99bd0345cb 100644 (file)
@@ -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))))