X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fbyte-optimize.el;h=dad9de8f5e03f14766a8bf59d48afb3cb0f23b79;hp=f591e82d5c6710e6aa800aee828cb8932e001ff1;hb=efdb31fd4c8db81d2414c32d491f1bf994263c74;hpb=75d621fb12f4d3bc3e2eecefac39fe62eecbd431 diff --git a/lisp/byte-optimize.el b/lisp/byte-optimize.el index f591e82..dad9de8 100644 --- a/lisp/byte-optimize.el +++ b/lisp/byte-optimize.el @@ -729,9 +729,15 @@ (decf (nth 1 form) last) (butlast form)) - ;; (- 0 x ...) --> (- (- x) ...) - ((and (eq 0 (nth 1 form)) (>= (length form) 3)) - `(- (- ,(nth 2 form)) ,@(nthcdr 3 form))) + ;; (- 0 ...) --> + ((eq 0 (nth 1 form)) + (case (length form) + ;; (- 0) --> 0 + (2 0) + ;; (- 0 x) --> (- x) + (3 `(- ,(nth 2 form))) + ;; (- 0 x y ...) --> (- (- x) y ...) + (t `(- (- ,(nth 2 form)) ,@(nthcdr 3 form))))) (t (byte-optimize-predicate form)))))