From 8ccc377f964b5327269f74968b43096ab0c01671 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 7 Jul 1993 03:06:28 +0000 Subject: [PATCH] (byte-compile-setq-default): Handle multiple pairs args like setq (as the setq-default subr does). --- lisp/emacs-lisp/bytecomp.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e3969cf4f85..6bbe1eba7e7 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2420,9 +2420,15 @@ If FORM is a lambda or a macro, byte-compile it as a function." (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)))) -- 2.39.5