diff options
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | ice-9/ChangeLog | 6 | ||||
-rw-r--r-- | ice-9/syncase.scm | 31 |
3 files changed, 23 insertions, 15 deletions
@@ -38,6 +38,7 @@ For fixes or providing information which led to a fix: Ron Peterson David Pirotte Ken Raeburn + Kevin Ryde Bill Schottstaedt Greg Troxel Momchil Velikov diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog index 481d2a5eb..075a9b17a 100644 --- a/ice-9/ChangeLog +++ b/ice-9/ChangeLog @@ -1,3 +1,9 @@ +2003-01-27 Mikael Djurfeldt <djurfeldt@nada.kth.se> + + * syncase.scm (guile-macro): Strip syntactic information from + expression before trying to treat it as a Guile macro call. + (Thanks to Kevin Ryde.) + 2003-01-24 Mikael Djurfeldt <djurfeldt@nada.kth.se> * threads.scm (parallel, letpar): Rewritten. diff --git a/ice-9/syncase.scm b/ice-9/syncase.scm index ba7c7bf87..d83d30a4e 100644 --- a/ice-9/syncase.scm +++ b/ice-9/syncase.scm @@ -157,21 +157,22 @@ (define guile-macro (cons 'external-macro (lambda (e r w s) - (if (symbol? e) - ;; pass the expression through - e - (let* ((eval-closure (fluid-ref expansion-eval-closure)) - (m (variable-ref (eval-closure (car e) #f)))) - (if (eq? (macro-type m) 'syntax) - ;; pass the expression through - e - ;; perform Guile macro transform - (let ((e ((macro-transformer m) - e - (append r (list eval-closure))))) - (if (null? r) - (sc-expand e) - (sc-chi e r w))))))))) + (let ((e (syntax-object->datum e))) + (if (symbol? e) + ;; pass the expression through + e + (let* ((eval-closure (fluid-ref expansion-eval-closure)) + (m (variable-ref (eval-closure (car e) #f)))) + (if (eq? (macro-type m) 'syntax) + ;; pass the expression through + e + ;; perform Guile macro transform + (let ((e ((macro-transformer m) + e + (append r (list eval-closure))))) + (if (null? r) + (sc-expand e) + (sc-chi e r w)))))))))) (define generated-symbols (make-weak-key-hash-table 1019)) |