From 199dd758a35083df49cca955a55b803c43149362 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 26 May 1993 21:31:36 +0000 Subject: (byte-optimize-divide): Don't optimize to less than two arguments. --- lisp/emacs-lisp/byte-opt.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/byte-opt.el') diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 2443d967658..4a39a71c617 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -663,7 +663,10 @@ (setq form (byte-optimize-delay-constants-math form 2 '*)) (let ((last (car (reverse (cdr (cdr form)))))) (if (numberp last) - (cond ((= last 1) + (cond ((= (length form) 3) + ;; Don't shrink to less than two arguments--would get an error. + nil) + ((= last 1) (setq form (byte-compile-butlast form))) ((numberp (nth 1 form)) (setq form (cons (car form) -- cgit v1.2.3