From a9f907cda6eb2babe5fb5aa2107f7e65ea198872 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 8 Aug 2019 00:06:15 -0700 Subject: pop: improve expansion. * share/txr/stdlib/place.tl (pop): Use alet for binding the temporary rather than let, so that if (,getter) expands to a symbol, it will disappear. --- share/txr/stdlib/place.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/txr/stdlib/place.tl b/share/txr/stdlib/place.tl index 303548da..20405396 100644 --- a/share/txr/stdlib/place.tl +++ b/share/txr/stdlib/place.tl @@ -275,7 +275,7 @@ (defmacro pop (place :env env) (with-gensyms (tmp) (with-update-expander (getter setter) place env - ^(let ((,tmp (,getter))) + ^(alet ((,tmp (,getter))) (prog1 (car ,tmp) (,setter (cdr ,tmp))))))) (defmacro pushnew (new-item place :env env : -- cgit v1.2.3