From: Chris Hanson Date: Fri, 19 Jan 2018 04:58:14 +0000 (-0800) Subject: Be a little more honest about unsyntaxing macro definitions. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~339 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f54ba65bf212498eff76015ebee0b4ee09c48150;p=mit-scheme.git Be a little more honest about unsyntaxing macro definitions. --- diff --git a/src/runtime/unsyn.scm b/src/runtime/unsyn.scm index e20d8a835..74240e021 100644 --- a/src/runtime/unsyn.scm +++ b/src/runtime/unsyn.scm @@ -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)