I've been trying to debug a macro that worked under 9.2.1 but fails under 10.90 (76bb84eaa). I've narrowed the problem down to the following reproducible test case:
(define-syntax bar (sc-macro-transformer (lambda (exp env) (let ((bindings (let ((sc (close-syntax (cadr exp) env))) (list sc sc)))) `(let* (,bindings) 'x))))) (define-syntax bat (syntax-rules () ((_ body ...) (let ((md 'quux)) (bar md))))) ;; Under 9.2.1: ;; 1 ]=> (pp (lambda () (bat x))) ;; (lambda () ;; (let ((md 'quux)) ;; (let ((md md)) ;; 'x))) ;; ;Unspecified return value ;; ;; 1 ]=> ;; Under 10.90 (76bb84eaa): ;; 1 ]=> (pp (lambda () (bat x))) ;; (lambda () ;; (let ((.md.1-0 'quux)) ;; (let ((.md.2-1 md)) ;; 'x))) ;; ;Unspecified return value ;; ;; 1 ]=> Note that the expansion under 10.90 means that (bat x) will fail because the variable md will be unbound. Is this a bug in macro expansion in 10.90, or was there a bug in 9.2.1 that caused my macro to work there? Or am I hopelessly confused? Thanks.