summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2009-02-05 22:11:26 +0000
committerNeil Jerram <neil@ossau.uklinux.net>2009-02-08 21:45:31 +0000
commitad5f5ada1d50ecdab634d60ffe3a13b9193156aa (patch)
tree3d91bdd4e81cc08d46030a5996e057548f2937c7
parent95a040cd2be7ad03bf197edbdb1fec2c52749ef6 (diff)
downloadguile-ad5f5ada1d50ecdab634d60ffe3a13b9193156aa.tar.gz
Allow @ to work with (ice-9 syncase)
(Reported by Panicz Maciej Godek.) * test-suite/tests/syncase.test ("@ works with syncase"): New test. * ice-9/syncase.scm (guile-macro): When a Guile macro transformer produces a variable, don't pass it through sc-expand.
-rw-r--r--NEWS7
-rw-r--r--THANKS1
-rw-r--r--ice-9/syncase.scm8
-rw-r--r--test-suite/tests/syncase.test3
4 files changed, 16 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 4502765a2..2d9916c5d 100644
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,13 @@ Changes in 1.8.7 (since 1.8.6)
** Fix build problem when scm_t_timespec is different from struct timespec
** Fix build when compiled with -Wundef -Werror
+** Allow @ macro to work with (ice-9 syncase)
+
+Previously, use of the @ macro in a module whose code is being
+transformed by (ice-9 syncase) would cause an "Invalid syntax" error.
+Now it works as you would expect (giving the value of the specified
+module binding).
+
Changes in 1.8.6 (since 1.8.5)
diff --git a/THANKS b/THANKS
index 1d90462ee..d93837d3b 100644
--- a/THANKS
+++ b/THANKS
@@ -41,6 +41,7 @@ For fixes or providing information which led to a fix:
Peter Gavin
Eric Gillespie, Jr
Didier Godefroy
+ Panicz Maciej Godek
John Goerzen
Mike Gran
Szavai Gyula
diff --git a/ice-9/syncase.scm b/ice-9/syncase.scm
index 6ee4d166e..39cf27372 100644
--- a/ice-9/syncase.scm
+++ b/ice-9/syncase.scm
@@ -146,9 +146,11 @@
(let ((e ((macro-transformer m)
e
(append r (list eval-closure)))))
- (if (null? r)
- (sc-expand e)
- (sc-chi e r w))))))))))
+ (if (variable? e)
+ e
+ (if (null? r)
+ (sc-expand e)
+ (sc-chi e r w)))))))))))
(define generated-symbols (make-weak-key-hash-table 1019))
diff --git a/test-suite/tests/syncase.test b/test-suite/tests/syncase.test
index 1184f7b54..c681fc381 100644
--- a/test-suite/tests/syncase.test
+++ b/test-suite/tests/syncase.test
@@ -34,3 +34,6 @@
(pass-if "basic syncase macro"
(= (plus 1 2 3) (+ 1 2 3)))
+
+(pass-if "@ works with syncase"
+ (eq? run-test (@ (test-suite lib) run-test)))