summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@oblong.net>2009-03-17 16:06:44 +0100
committerAndy Wingo <wingo@oblong.net>2009-03-17 16:06:44 +0100
commit40af975ba8d5f9bde4a60262b7bc6aa6ad3c7546 (patch)
tree834e0c89b978a54b722b344e571c359ab4da7865
parent51ab250ff4b9f8c95a4f9f7e50dc08c7177c7343 (diff)
parentad5f5ada1d50ecdab634d60ffe3a13b9193156aa (diff)
downloadguile-40af975ba8d5f9bde4a60262b7bc6aa6ad3c7546.tar.gz
Merge commit 'ad5f5ada1d50ecdab634d60ffe3a13b9193156aa' into vm-check
-rw-r--r--NEWS7
-rw-r--r--THANKS1
-rw-r--r--module/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/module/ice-9/syncase.scm b/module/ice-9/syncase.scm
index 82a69200a..5a5e1a6ea 100644
--- a/module/ice-9/syncase.scm
+++ b/module/ice-9/syncase.scm
@@ -149,9 +149,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)))