changeset 4013:29f808aa587f

(byte-compile-setq-default): Handle multiple pairs args like setq (as the setq-default subr does).
author Roland McGrath <roland@gnu.org>
date Wed, 07 Jul 1993 03:06:28 +0000
parents 26e0209b6e56
children d7374f1828b5
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Wed Jul 07 02:03:18 1993 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Wed Jul 07 03:06:28 1993 +0000
@@ -2420,9 +2420,15 @@
     (setq for-effect nil)))
 
 (defun byte-compile-setq-default (form)
-  (byte-compile-form
-   (cons 'set-default (cons (list 'quote (nth 1 form))
-			    (nthcdr 2 form)))))
+  (let ((args (cdr form)))
+    (if args
+	(while args
+	  (byte-compile-form
+	   (list 'set-default (list 'quote (car args)) (car (cdr args))))
+	  (setq args (cdr (cdr args))))
+      ;; (setq-default), with no arguments.
+      (byte-compile-form nil for-effect))
+    (setq for-effect nil)))
 
 (defun byte-compile-quote (form)
   (byte-compile-constant (car (cdr form))))