diff options
author | Roland McGrath <roland@gnu.org> | 1993-07-07 03:06:28 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1993-07-07 03:06:28 +0000 |
commit | 8ccc377f964b5327269f74968b43096ab0c01671 (patch) | |
tree | 744a03a29390e7f0eb122124fae0cae035808074 /lisp/emacs-lisp/bytecomp.el | |
parent | 23de57664f87e4d65e55ba32c2bbf122c01ca0c2 (diff) | |
download | emacs-8ccc377f964b5327269f74968b43096ab0c01671.tar.gz emacs-8ccc377f964b5327269f74968b43096ab0c01671.tar.bz2 emacs-8ccc377f964b5327269f74968b43096ab0c01671.zip |
(byte-compile-setq-default): Handle multiple pairs args like setq (as
the setq-default subr does).
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 12 |
1 files 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)))) |