~ chicken-core (chicken-5) 7d308b23d624a6b0111058a93887716e823ef73e
commit 7d308b23d624a6b0111058a93887716e823ef73e
Author: Peter Bex <peter.bex@xs4all.nl>
AuthorDate: Mon Sep 24 21:09:15 2012 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Mon Sep 24 21:43:33 2012 +0200
Wrap remaining 'bare lambda' macro transformers in er-macro-transformer calls, to prevent future breakage when this deprecated feature is actually removed
Signed-off-by: felix <felix@call-with-current-continuation.org>
diff --git a/srfi-13.scm b/srfi-13.scm
index 3dbc2cac..7b161532 100644
--- a/srfi-13.scm
+++ b/srfi-13.scm
@@ -150,23 +150,24 @@
. body) ) ) ) ) )
(define-syntax let-string-start+end
- (lambda (form r c)
- (##sys#check-syntax 'let-string-start+end form '(_ _ _ _ _ . _))
- (let ((s-e-r (cadr form))
- (proc (caddr form))
- (s-exp (cadddr form))
- (args-exp (car (cddddr form)))
- (body (cdr (cddddr form)))
- (%receive (r 'receive))
- (%string-parse-start+end (r 'string-parse-start+end))
- (%string-parse-final-start+end (r 'string-parse-final-start+end)))
- (if (pair? (cddr s-e-r))
- `(,%receive (,(caddr s-e-r) ,(car s-e-r) ,(cadr s-e-r))
- (,%string-parse-start+end ,proc ,s-exp ,args-exp)
- ,@body)
- `(,%receive ,s-e-r
- (,%string-parse-final-start+end ,proc ,s-exp ,args-exp)
- ,@body) ) )))
+ (er-macro-transformer
+ (lambda (form r c)
+ (##sys#check-syntax 'let-string-start+end form '(_ _ _ _ _ . _))
+ (let ((s-e-r (cadr form))
+ (proc (caddr form))
+ (s-exp (cadddr form))
+ (args-exp (car (cddddr form)))
+ (body (cdr (cddddr form)))
+ (%receive (r 'receive))
+ (%string-parse-start+end (r 'string-parse-start+end))
+ (%string-parse-final-start+end (r 'string-parse-final-start+end)))
+ (if (pair? (cddr s-e-r))
+ `(,%receive (,(caddr s-e-r) ,(car s-e-r) ,(cadr s-e-r))
+ (,%string-parse-start+end ,proc ,s-exp ,args-exp)
+ ,@body)
+ `(,%receive ,s-e-r
+ (,%string-parse-final-start+end ,proc ,s-exp ,args-exp)
+ ,@body) ) ))))
;;; Returns three values: rest start end
diff --git a/srfi-69.scm b/srfi-69.scm
index 9fba35e6..a36ec891 100644
--- a/srfi-69.scm
+++ b/srfi-69.scm
@@ -125,19 +125,20 @@
(define-constant flonum-magic 331804471)
(define-syntax $flonum-hash
- (lambda (form r c)
- (let ( (flo (cadr form))
- (_%subbyte (r '%subbyte))
- (_flonum-magic (r 'flonum-magic))
- (_fx+ (r 'fx+))
- (_fx* (r 'fx*))
- (_fxshl (r 'fxshl)) )
- `(,_fx* ,_flonum-magic
- ,(let loop ( (idx (fx- (##sys#size 1.0) 1)) )
- (if (fx= 0 idx)
- `(,_%subbyte ,flo 0)
- `(,_fx+ (,_%subbyte ,flo ,idx)
- (,_fxshl ,(loop (fx- idx 1)) 1)) ) ) ) ) ) )
+ (er-macro-transformer
+ (lambda (form r c)
+ (let ( (flo (cadr form))
+ (_%subbyte (r '%subbyte))
+ (_flonum-magic (r 'flonum-magic))
+ (_fx+ (r 'fx+))
+ (_fx* (r 'fx*))
+ (_fxshl (r 'fxshl)) )
+ `(,_fx* ,_flonum-magic
+ ,(let loop ( (idx (fx- (##sys#size 1.0) 1)) )
+ (if (fx= 0 idx)
+ `(,_%subbyte ,flo 0)
+ `(,_fx+ (,_%subbyte ,flo ,idx)
+ (,_fxshl ,(loop (fx- idx 1)) 1)) ) ) ) ) )) )
(define (##sys#number-hash-hook obj rnd)
(*equal?-hash obj rnd) )
diff --git a/tests/module-tests.scm b/tests/module-tests.scm
index 928046a0..6d7bd1c8 100644
--- a/tests/module-tests.scm
+++ b/tests/module-tests.scm
@@ -281,8 +281,9 @@
(module m29 *
(import chicken scheme)
(define-syntax m29-baz
- (lambda _
- ''foo)))
+ (er-macro-transformer
+ (lambda _
+ ''foo))))
(module m30 *
(import chicken scheme)
Trap