]> git.eshelyaron.com Git - emacs.git/commitdiff
(byte-compile-setq-default):
authorRichard M. Stallman <rms@gnu.org>
Fri, 9 Jul 1993 06:33:05 +0000 (06:33 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 9 Jul 1993 06:33:05 +0000 (06:33 +0000)
Generate a progn of calls to set-default, then compile it.
(byte-compile-file-form-defmumble): Put back second arg of
byte-compile-keep-pending, accidentally deleted before.

lisp/emacs-lisp/bytecomp.el

index 6bbe1eba7e7f15ca0ae7c86c19802334578cd1c1..7364f8803df4515593acff167ed7dc94a63bbaac 100644 (file)
@@ -1589,7 +1589,8 @@ With argument, insert value in current buffer after the form."
                          (list 'cons ''macro code))
                         ((list 'quote (if macrop
                                           (cons 'macro new-one)
-                                        new-one))))))
+                                        new-one)))))
+            'byte-compile-two-args)
          ;; Output the form by hand, that's much simpler than having
          ;; b-c-output-file-form analyze the defalias.
          (byte-compile-flush-pending)
@@ -2420,15 +2421,14 @@ If FORM is a lambda or a macro, byte-compile it as a function."
     (setq for-effect nil)))
 
 (defun byte-compile-setq-default (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)))
+  (let ((args (cdr form))
+       setters)
+    (while args
+      (setq setters
+           (cons (list 'set-default (list 'quote (car args)) (car (cdr args)))
+                 setters))
+      (setq args (cdr (cdr args))))
+    (byte-compile-form (cons 'progn (nreverse setters)))))
 
 (defun byte-compile-quote (form)
   (byte-compile-constant (car (cdr form))))