1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

* syncase.scm (guile-macro): Strip syntactic information from

expression before trying to treat it as a Guile macro call.
(Thanks to Kevin Ryde.)
This commit is contained in:
Mikael Djurfeldt 2003-01-27 08:46:18 +00:00
parent c2950e36ef
commit e963ac2c54
3 changed files with 23 additions and 15 deletions

1
THANKS
View file

@ -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

View file

@ -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.

View file

@ -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))