changeset 48834:ffa5e816fcad

(byte-optimize-form-code-walker): Optimize the remaining part of for-effect and/or expressions.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 13 Dec 2002 19:52:46 +0000
parents df00563bf991
children 750e9e67d3e9
files lisp/emacs-lisp/byte-opt.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/byte-opt.el	Fri Dec 13 19:52:35 2002 +0000
+++ b/lisp/emacs-lisp/byte-opt.el	Fri Dec 13 19:52:46 2002 +0000
@@ -467,7 +467,7 @@
 		     (byte-compile-log
 		      "  all subforms of %s called for effect; deleted" form))
 		 (and backwards
-		      (cons fn (nreverse backwards))))
+		      (cons fn (nreverse (mapcar 'byte-optimize-form backwards)))))
 	     (cons fn (mapcar 'byte-optimize-form (cdr form)))))
 
 	  ((eq fn 'interactive)
@@ -1159,6 +1159,8 @@
 
 (put 'featurep 'byte-optimizer 'byte-optimize-featurep)
 (defun byte-optimize-featurep (form)
+  ;; Emacs-21's byte-code doesn't run under XEmacs anyway, so we can
+  ;; safely optimize away this test.
   (if (equal '((quote xemacs)) (cdr-safe form))
       nil
     form))