diff options
author | Glenn Morris <rgm@gnu.org> | 2013-06-19 00:35:00 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-06-19 00:35:00 -0700 |
commit | 2285bd27abf63a460d7025b2e5579f67cdd2e6fb (patch) | |
tree | 89e5f4d1a2e93b2d06d51a7d1fcc2e2e5588574e /lisp/emacs-lisp/bytecomp.el | |
parent | 3883037ba56236b96a15489d476ac8fe42723648 (diff) | |
download | emacs-2285bd27abf63a460d7025b2e5579f67cdd2e6fb.tar.gz emacs-2285bd27abf63a460d7025b2e5579f67cdd2e6fb.tar.bz2 emacs-2285bd27abf63a460d7025b2e5579f67cdd2e6fb.zip |
Check autoload's "type" argument correctly in bytecomp.el
* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-autoload):
Only eval autoloaded macros.
(byte-compile-autoload): Only give the macro warning for macros.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 391401ae5d6..f4e79dc4886 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2215,7 +2215,7 @@ list that represents a doc string reference. (and (let ((form form)) (while (if (setq form (cdr form)) (macroexp-const-p (car form)))) (null form)) ;Constants only - (eval (nth 5 form)) ;Macro + (memq (eval (nth 5 form)) '(t macro)) ;Macro (eval form)) ;Define the autoload. ;; Avoid undefined function warnings for the autoload. (when (and (consp (nth 1 form)) @@ -4187,7 +4187,7 @@ binding slots have been popped." (byte-compile-set-symbol-position 'autoload) (and (macroexp-const-p (nth 1 form)) (macroexp-const-p (nth 5 form)) - (eval (nth 5 form)) ; macro-p + (memq (eval (nth 5 form)) '(t macro)) ; macro-p (not (fboundp (eval (nth 1 form)))) (byte-compile-warn "The compiler ignores `autoload' except at top level. You should |