summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/byte-opt.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/byte-opt.el')
-rw-r--r--lisp/emacs-lisp/byte-opt.el5
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)