summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/byte-opt.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1999-05-17 01:37:04 +0000
committerRichard M. Stallman <rms@gnu.org>1999-05-17 01:37:04 +0000
commitea9d637111b8ee28406b766397e2d623a54fb2bd (patch)
tree43849da94c06424ba0a09066ee25bc458a20882a /lisp/emacs-lisp/byte-opt.el
parentb1ae662fa6945545d6933276bfb68d17445d2414 (diff)
downloademacs-ea9d637111b8ee28406b766397e2d623a54fb2bd.tar.gz
(byte-optimize-plus): Fix 1-arg case.
Diffstat (limited to 'lisp/emacs-lisp/byte-opt.el')
-rw-r--r--lisp/emacs-lisp/byte-opt.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index cfec516056c..4f399f4b4cf 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -700,6 +700,10 @@
;;; (actually, it would be safe if we know the sole arg
;;; is not a marker).
;; ((null (cdr (cdr form))) (nth 1 form))
+ ((null (cddr form))
+ (if (numberp (nth 1 form))
+ (nth 1 form)
+ form))
((and (null (nthcdr 3 form))
(or (memq (nth 1 form) '(1 -1))
(memq (nth 2 form) '(1 -1))))