diff options
| author | Stefan Monnier | 2008-03-03 03:40:04 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-03-03 03:40:04 +0000 |
| commit | 86408b246c8bf26cbadd830322e348267da22162 (patch) | |
| tree | c93cdbcf6153a2f11ef0105a1ca26a80e860e3d9 | |
| parent | 42521cd491e5fdfdab5dec9a7c6c4d3452dde9fa (diff) | |
| download | emacs-86408b246c8bf26cbadd830322e348267da22162.tar.gz emacs-86408b246c8bf26cbadd830322e348267da22162.zip | |
(byte-compile-maybe-guarded):
Remove optimization that was working around the form-code-walker bug.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 18 |
2 files changed, 4 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4cf70876075..4c101745853 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2008-03-03 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-03-03 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-maybe-guarded): | ||
| 4 | Remove optimization that was working around the form-code-walker bug. | ||
| 5 | |||
| 3 | * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): | 6 | * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): |
| 4 | Walk into the body of lambdas after byte-compile-unfold-lambda. | 7 | Walk into the body of lambdas after byte-compile-unfold-lambda. |
| 5 | 8 | ||
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 797c44ead10..e62968a392d 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -3569,23 +3569,7 @@ that suppresses all warnings during execution of BODY." | |||
| 3569 | (byte-compile-bound-variables | 3569 | (byte-compile-bound-variables |
| 3570 | (if bound-list | 3570 | (if bound-list |
| 3571 | (append bound-list byte-compile-bound-variables) | 3571 | (append bound-list byte-compile-bound-variables) |
| 3572 | byte-compile-bound-variables)) | 3572 | byte-compile-bound-variables))) |
| 3573 | ;; Suppress all warnings, for code not used in Emacs. | ||
| 3574 | ;; FIXME: by the time this is executed the `featurep' | ||
| 3575 | ;; emacs/xemacs tests have been optimized away, so this is | ||
| 3576 | ;; not doing anything useful here, is should probably be | ||
| 3577 | ;; moved to a different place. | ||
| 3578 | ;; It is doing _something_. If this is commented out, then | ||
| 3579 | ;; compiling a file which requires another file which | ||
| 3580 | ;; defines a defsubst that uses (featurep 'xemacs) results | ||
| 3581 | ;; in a spurious compilation warning about the xemacs code. Eg: | ||
| 3582 | ;; (defsubst foo () (if (featurep 'xemacs) (setq foo t))) | ||
| 3583 | ;; where foo is a free variable. | ||
| 3584 | (byte-compile-warnings | ||
| 3585 | (if (member ,condition '((featurep 'xemacs) | ||
| 3586 | (not (featurep 'emacs)))) | ||
| 3587 | nil byte-compile-warnings)) | ||
| 3588 | ) | ||
| 3589 | (unwind-protect | 3573 | (unwind-protect |
| 3590 | (progn ,@body) | 3574 | (progn ,@body) |
| 3591 | ;; Maybe remove the function symbol from the unresolved list. | 3575 | ;; Maybe remove the function symbol from the unresolved list. |