diff options
| author | Glenn Morris | 2013-06-19 00:35:00 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-06-19 00:35:00 -0700 |
| commit | 2285bd27abf63a460d7025b2e5579f67cdd2e6fb (patch) | |
| tree | 89e5f4d1a2e93b2d06d51a7d1fcc2e2e5588574e | |
| parent | 3883037ba56236b96a15489d476ac8fe42723648 (diff) | |
| download | emacs-2285bd27abf63a460d7025b2e5579f67cdd2e6fb.tar.gz 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.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2886d0e00d4..b35035df729 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2013-06-19 Glenn Morris <rgm@gnu.org> | 1 | 2013-06-19 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-file-form-autoload): | ||
| 4 | Only eval autoloaded macros. | ||
| 5 | (byte-compile-autoload): Only give the macro warning for macros. | ||
| 6 | |||
| 3 | * progmodes/cperl-mode.el (ps-bold-faces, ps-italic-faces) | 7 | * progmodes/cperl-mode.el (ps-bold-faces, ps-italic-faces) |
| 4 | (ps-underlined-faces): Declare. | 8 | (ps-underlined-faces): Declare. |
| 5 | 9 | ||
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. | |||
| 2215 | (and (let ((form form)) | 2215 | (and (let ((form form)) |
| 2216 | (while (if (setq form (cdr form)) (macroexp-const-p (car form)))) | 2216 | (while (if (setq form (cdr form)) (macroexp-const-p (car form)))) |
| 2217 | (null form)) ;Constants only | 2217 | (null form)) ;Constants only |
| 2218 | (eval (nth 5 form)) ;Macro | 2218 | (memq (eval (nth 5 form)) '(t macro)) ;Macro |
| 2219 | (eval form)) ;Define the autoload. | 2219 | (eval form)) ;Define the autoload. |
| 2220 | ;; Avoid undefined function warnings for the autoload. | 2220 | ;; Avoid undefined function warnings for the autoload. |
| 2221 | (when (and (consp (nth 1 form)) | 2221 | (when (and (consp (nth 1 form)) |
| @@ -4187,7 +4187,7 @@ binding slots have been popped." | |||
| 4187 | (byte-compile-set-symbol-position 'autoload) | 4187 | (byte-compile-set-symbol-position 'autoload) |
| 4188 | (and (macroexp-const-p (nth 1 form)) | 4188 | (and (macroexp-const-p (nth 1 form)) |
| 4189 | (macroexp-const-p (nth 5 form)) | 4189 | (macroexp-const-p (nth 5 form)) |
| 4190 | (eval (nth 5 form)) ; macro-p | 4190 | (memq (eval (nth 5 form)) '(t macro)) ; macro-p |
| 4191 | (not (fboundp (eval (nth 1 form)))) | 4191 | (not (fboundp (eval (nth 1 form)))) |
| 4192 | (byte-compile-warn | 4192 | (byte-compile-warn |
| 4193 | "The compiler ignores `autoload' except at top level. You should | 4193 | "The compiler ignores `autoload' except at top level. You should |