Commit 2285bd27 authored by Glenn Morris's avatar Glenn Morris
Browse files

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.
parent 3883037b
2013-06-19 Glenn Morris <rgm@gnu.org> 2013-06-19 Glenn Morris <rgm@gnu.org>
* emacs-lisp/bytecomp.el (byte-compile-file-form-autoload):
Only eval autoloaded macros.
(byte-compile-autoload): Only give the macro warning for macros.
* progmodes/cperl-mode.el (ps-bold-faces, ps-italic-faces) * progmodes/cperl-mode.el (ps-bold-faces, ps-italic-faces)
(ps-underlined-faces): Declare. (ps-underlined-faces): Declare.
......
...@@ -2215,7 +2215,7 @@ list that represents a doc string reference. ...@@ -2215,7 +2215,7 @@ list that represents a doc string reference.
(and (let ((form form)) (and (let ((form form))
(while (if (setq form (cdr form)) (macroexp-const-p (car form)))) (while (if (setq form (cdr form)) (macroexp-const-p (car form))))
(null form)) ;Constants only (null form)) ;Constants only
(eval (nth 5 form)) ;Macro (memq (eval (nth 5 form)) '(t macro)) ;Macro
(eval form)) ;Define the autoload. (eval form)) ;Define the autoload.
;; Avoid undefined function warnings for the autoload. ;; Avoid undefined function warnings for the autoload.
(when (and (consp (nth 1 form)) (when (and (consp (nth 1 form))
...@@ -4187,7 +4187,7 @@ binding slots have been popped." ...@@ -4187,7 +4187,7 @@ binding slots have been popped."
(byte-compile-set-symbol-position 'autoload) (byte-compile-set-symbol-position 'autoload)
(and (macroexp-const-p (nth 1 form)) (and (macroexp-const-p (nth 1 form))
(macroexp-const-p (nth 5 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)))) (not (fboundp (eval (nth 1 form))))
(byte-compile-warn (byte-compile-warn
"The compiler ignores `autoload' except at top level. You should "The compiler ignores `autoload' except at top level. You should
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment