comparison 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
comparison
equal deleted inserted replaced
451:8ad70c5cd5d7 452:3d3049ae1304
471 for-effect)))) 471 for-effect))))
472 (setq backwards (cdr backwards))) 472 (setq backwards (cdr backwards)))
473 (if (and (cdr form) (null backwards)) 473 (if (and (cdr form) (null backwards))
474 (byte-compile-log 474 (byte-compile-log
475 " all subforms of %s called for effect; deleted" form)) 475 " all subforms of %s called for effect; deleted" form))
476 (and backwards 476 (when backwards
477 ;; Now optimize the rest of the forms. We need the return 477 ;; Now optimize the rest of the forms. We need the return
478 ;; values. We already did the car. 478 ;; values. We already did the car.
479 (setcdr backwards 479 (setcdr backwards
480 (mapcar 'byte-optimize-form (cdr backwards))) 480 (mapcar 'byte-optimize-form (cdr backwards))))
481 (cons fn (nreverse backwards)))) 481 (cons fn (nreverse backwards)))
482 (cons fn (mapcar 'byte-optimize-form (cdr form))))) 482 (cons fn (mapcar 'byte-optimize-form (cdr form)))))
483 483
484 ((eq fn 'interactive) 484 ((eq fn 'interactive)
485 (byte-compile-warn "misplaced interactive spec: %s" 485 (byte-compile-warn "misplaced interactive spec: %s"
486 (prin1-to-string form)) 486 (prin1-to-string form))