diff lisp/cl-macs.el @ 5314:596011a8bf8f

= < > <= >=: it's OK to use the compiler macro when first, last args side effect 2010-12-29 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el (= < > <= >=): For these functions' compiler macros, the optimisation is safe even if the first and the last arguments have side effects, since they're only used the once.
author Aidan Kehoe <kehoea@parhasard.net>
date Wed, 29 Dec 2010 23:47:30 +0000
parents 5ed261fd2bd9
children 9ac28212c75a
line wrap: on
line diff
--- a/lisp/cl-macs.el	Wed Dec 29 23:43:10 2010 +0000
+++ b/lisp/cl-macs.el	Wed Dec 29 23:47:30 2010 +0000
@@ -3752,7 +3752,7 @@
          (put function 'cl-compiler-macro
               #'(lambda (form &rest arguments)
                   (if (or (null (nthcdr 3 form))
-                          (notevery #'cl-safe-expr-p (cdr form)))
+                          (notevery #'cl-safe-expr-p (butlast (cdr arguments))))
                       form
                     (cons 'and (mapcon
                                 #'(lambda (rest)