From b9dbe89e6f32916fa34475b5a5343376c974ba9d Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sun, 3 Apr 2016 18:47:33 +0200 Subject: [PATCH] Remove define-macro style define-syntax syntax. This was undocumented and unsupported, and complicated the code of "##sys#canonicalize-body". It was probably a remnant of the old define-compiler-syntax stuff. --- NEWS | 4 ++++ expand.scm | 19 +++++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index 40ac6d4..018145b 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,10 @@ namespace. - Added support for list-style library names. +- Syntax expander + - Removed support for (define-syntax (foo e r c) ...) inside lambdas, + which was undocumented and not officially supported anyway. + 4.10.2 - Security fixes diff --git a/expand.scm b/expand.scm index 4d71ff8..95d4d06 100644 --- a/expand.scm +++ b/expand.scm @@ -534,20 +534,11 @@ (symbol? (caar body)) (comp 'define-syntax (caar body))) (let ((def (car body))) - (loop - (cdr body) - (cons (cond ((pair? (cadr def)) ; DEPRECATED - `(define-syntax ; (the first element is actually ignored) - ,(caadr def) - (##sys#er-transformer - (##core#lambda ,(cdadr def) ,@(cddr def))))) - ;; insufficient, if introduced by different expansions, but - ;; better than nothing: - ((eq? (car def) (cadr def)) - (defjam-error def)) - (else def)) - defs) - #f))) + ;; This check is insufficient, if introduced by + ;; different expansions, but better than nothing: + (when (eq? (car def) (cadr def)) + (defjam-error def)) + (loop (cdr body) (cons def defs) #f) ) ) (else (loop body defs #t)))))) (define (expand body) ;; Each #t in "mvars" matches with an MV-capable "var". Non-MV -- 2.1.4