diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-05-26 21:31:36 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-05-26 21:31:36 +0000 |
commit | 199dd758a35083df49cca955a55b803c43149362 (patch) | |
tree | 220a91aecc6ec6e8b19289d4cff518cb24426e60 /lisp/emacs-lisp | |
parent | a22f4c7d340029af77c597bea1159b00510bb996 (diff) | |
download | emacs-199dd758a35083df49cca955a55b803c43149362.tar.gz emacs-199dd758a35083df49cca955a55b803c43149362.tar.bz2 emacs-199dd758a35083df49cca955a55b803c43149362.zip |
(byte-optimize-divide): Don't optimize to less than two arguments.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 5 |
1 files changed, 4 insertions, 1 deletions
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) |