diff lisp/byte-optimize.el @ 452:3d3049ae1304 r21-2-41

Import from CVS: tag r21-2-41
author cvs
date Mon, 13 Aug 2007 11:40:21 +0200
parents 3078fd1074e8
children 5aa1854ad537
line wrap: on
line diff
--- a/lisp/byte-optimize.el	Mon Aug 13 11:39:21 2007 +0200
+++ b/lisp/byte-optimize.el	Mon Aug 13 11:40:21 2007 +0200
@@ -473,12 +473,12 @@
 		 (if (and (cdr form) (null backwards))
 		     (byte-compile-log
 		      "  all subforms of %s called for effect; deleted" form))
-		 (and backwards
-                      ;; Now optimize the rest of the forms. We need the return
-                      ;; values. We already did the car.
-                      (setcdr backwards
-                              (mapcar 'byte-optimize-form (cdr backwards)))
-		      (cons fn (nreverse backwards))))
+		 (when backwards
+		   ;; Now optimize the rest of the forms. We need the return
+		   ;; values. We already did the car.
+		   (setcdr backwards
+			   (mapcar 'byte-optimize-form (cdr backwards))))
+		 (cons fn (nreverse backwards)))
 	     (cons fn (mapcar 'byte-optimize-form (cdr form)))))
 
 	  ((eq fn 'interactive)