aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-09-17 07:29:43 +0000
committerGlenn Morris2009-09-17 07:29:43 +0000
commit88d5190ca284a973930628e318e69461baa24610 (patch)
tree8116cd573c74a8954df66fc661fdeaefea7bc11c
parenta8106aecf0be7a29024eb8c507f1f9968bb8bafa (diff)
downloademacs-88d5190ca284a973930628e318e69461baa24610.tar.gz
emacs-88d5190ca284a973930628e318e69461baa24610.zip
(byte-compile-form): Always check the function arguments, whether or
not it has a handler.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/bytecomp.el12
2 files changed, 9 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9f958013f74..8c982559c48 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12009-09-17 Glenn Morris <rgm@gnu.org> 12009-09-17 Glenn Morris <rgm@gnu.org>
2 2
3 * emacs-lisp/bytecomp.el (byte-compile-form): Always check the function
4 arguments, whether or not it has a handler.
5
3 * ansi-color.el (ansi-color-get-face-1): Fix typo in handler. 6 * ansi-color.el (ansi-color-get-face-1): Fix typo in handler.
4 7
5 * simple.el (hard-newline): Give it a doc-string. 8 * simple.el (hard-newline): Give it a doc-string.
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."
2980 (memq bytecomp-fn byte-compile-interactive-only-functions) 2980 (memq bytecomp-fn byte-compile-interactive-only-functions)
2981 (byte-compile-warn "`%s' used from Lisp code\n\ 2981 (byte-compile-warn "`%s' used from Lisp code\n\
2982That command is designed for interactive use only" bytecomp-fn)) 2982That command is designed for interactive use only" bytecomp-fn))
2983 (when (byte-compile-warning-enabled-p 'callargs)
2984 (if (memq bytecomp-fn
2985 '(custom-declare-group custom-declare-variable
2986 custom-declare-face))
2987 (byte-compile-nogroup-warn form))
2988 (byte-compile-callargs-warn form))
2983 (if (and bytecomp-handler 2989 (if (and bytecomp-handler
2984 ;; Make sure that function exists. This is important 2990 ;; Make sure that function exists. This is important
2985 ;; for CL compiler macros since the symbol may be 2991 ;; for CL compiler macros since the symbol may be
@@ -2993,12 +2999,6 @@ That command is designed for interactive use only" bytecomp-fn))
2993 (get (get bytecomp-fn 'byte-opcode) 2999 (get (get bytecomp-fn 'byte-opcode)
2994 'emacs19-opcode)))) 3000 'emacs19-opcode))))
2995 (funcall bytecomp-handler form) 3001 (funcall bytecomp-handler form)
2996 (when (byte-compile-warning-enabled-p 'callargs)
2997 (if (memq bytecomp-fn
2998 '(custom-declare-group custom-declare-variable
2999 custom-declare-face))
3000 (byte-compile-nogroup-warn form))
3001 (byte-compile-callargs-warn form))
3002 (byte-compile-normal-call form)) 3002 (byte-compile-normal-call form))
3003 (if (byte-compile-warning-enabled-p 'cl-functions) 3003 (if (byte-compile-warning-enabled-p 'cl-functions)
3004 (byte-compile-cl-warn form)))) 3004 (byte-compile-cl-warn form))))