From 606bf7b40afc23ebeb4fdedd0981848ee671f9a1 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 30 Aug 2017 06:31:03 -0700 Subject: 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. --- share/txr/stdlib/place.tl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'share') 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))) -- cgit v1.2.3