Be a little more honest about unsyntaxing macro definitions.
authorChris Hanson <org/chris-hanson/cph>
Fri, 19 Jan 2018 04:58:14 +0000 (20:58 -0800)
committerChris Hanson <org/chris-hanson/cph>
Fri, 19 Jan 2018 04:58:14 +0000 (20:58 -0800)
src/runtime/unsyn.scm

index e20d8a835a8161933c664f02a6654ec66dbfe062..74240e02167315a625c0ed7aa3f623828c94c1cd 100644 (file)
@@ -172,23 +172,26 @@ USA.
 
 (define (unexpand-definition environment name value)
   (cond ((macro-reference-trap-expression? value)
-        `(DEFINE-SYNTAX ,name
-           ,(unsyntax-object
-             environment
-             (macro-reference-trap-expression-transformer value))))
+        `(define ,name
+           (make-macro-reference-trap-expression
+            ,(unsyntax-object
+              environment
+              (macro-reference-trap-expression-transformer value)))))
        ((and (eq? #t unsyntaxer:macroize?)
              (lambda? value)
              (not (has-substitution? value)))
         (lambda-components* value
           (lambda (lambda-name required optional rest body)
             (if (eq? lambda-name name)
-                `(DEFINE (,name . ,(make-lambda-list required optional rest '()))
+                `(define (,name
+                          . ,(make-lambda-list required optional rest '()))
                    ,@(with-bindings environment value
-                                    (lambda (environment*)
-                                      (unsyntax-lambda-body environment* body))))
-                `(DEFINE ,name ,@(unexpand-binding-value environment value))))))
+                       (lambda (environment*)
+                         (unsyntax-lambda-body environment* body))))
+                `(define ,name
+                   ,@(unexpand-binding-value environment value))))))
        (else
-        `(DEFINE ,name ,@(unexpand-binding-value environment value)))))
+        `(define ,name ,@(unexpand-binding-value environment value)))))
 
 (define (unexpand-binding-value environment value)
   (if (unassigned-reference-trap? value)