summaryrefslogtreecommitdiff
path: root/module/ice-9/psyntax-pp.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2013-12-24 06:42:51 -0500
committerMark H Weaver <mhw@netris.org>2014-01-09 17:40:43 -0500
commit8de355d08e25a877326489c4b0eb09d313c548dc (patch)
tree160e334a6ff7aba368c4daaaf2197f1f6fc46052 /module/ice-9/psyntax-pp.scm
parent306cc01d3981feaa11aa0d866ff1d99128f0ace3 (diff)
downloadguile-8de355d08e25a877326489c4b0eb09d313c548dc.tar.gz
psyntax: toplevel variable definitions discard previous syntactic binding.
* module/ice-9/psyntax.scm (expand-top-sequence): When defining a toplevel variable, use the value of the same-named imported _variable_, if any. Do _not_ use an existing syntactic binding. * module/ice-9/psyntax-pp.scm: Regenerate.
Diffstat (limited to 'module/ice-9/psyntax-pp.scm')
-rw-r--r--module/ice-9/psyntax-pp.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/ice-9/psyntax-pp.scm b/module/ice-9/psyntax-pp.scm
index f5f764b0f..98a106e53 100644
--- a/module/ice-9/psyntax-pp.scm
+++ b/module/ice-9/psyntax-pp.scm
@@ -629,7 +629,9 @@
(not (module-local-variable (current-module) n))
(current-module))
(let ((old (module-variable (current-module) n)))
- (if (and (variable? old) (variable-bound? old))
+ (if (and (variable? old)
+ (variable-bound? old)
+ (not (macro? (variable-ref old))))
(module-define! (current-module) n (variable-ref old))
(module-add! (current-module) n (make-undefined-variable)))))
(values