summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-08-30 06:31:03 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-08-30 06:31:03 -0700
commitfbe41a2dd38cce6c2c4a62862b88233c4cfcef72 (patch)
tree13c3792d96fb646f3b27ec841a9877879cac4abc
parent21f6a387fe3b0c61ae70f77c23abc1eeb5489bb5 (diff)
downloadtxr-fbe41a2dd38cce6c2c4a62862b88233c4cfcef72.tar.gz
txr-fbe41a2dd38cce6c2c4a62862b88233c4cfcef72.tar.bz2
txr-fbe41a2dd38cce6c2c4a62862b88233c4cfcef72.zip
bugfix: places: handling of lisp1 contexts.
* share/txr/stdlib/place.tl (sys:l1-val): Use the expanded version of the place in the resulting form, because some of the operators like sys:lisp1-value will not expand it. Previously we were getting away with (sys:l1-val @1) expanding to (sys:lisp1-value @1) because the op expander would traverse through this blindly and replace @1.
-rw-r--r--share/txr/stdlib/place.tl6
1 files changed, 3 insertions, 3 deletions
diff --git a/share/txr/stdlib/place.tl b/share/txr/stdlib/place.tl
index f8bbd580..2ae0d839 100644
--- a/share/txr/stdlib/place.tl
+++ b/share/txr/stdlib/place.tl
@@ -49,11 +49,11 @@
(let ((e-expr (macroexpand u-expr e)))
(if (and (symbolp e-expr) (not (constantp e-expr)))
(caseq (lexical-lisp1-binding e e-expr)
- (:fun ^(fun ,u-expr))
- (:var u-expr)
+ (:fun ^(fun ,e-expr))
+ (:var e-expr)
(nil (if (boundp e-expr)
u-expr
- ^(sys:lisp1-value ,u-expr)))
+ ^(sys:lisp1-value ,e-expr)))
(t (sys:eval-err "sys:l1-val: invalid case")))
u-expr)))