From 957f80f26807582927fa580c705e9aa59327771d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 7 Sep 2016 19:16:32 -0700 Subject: Bugfix: issue with expansion of place macros. The expansion of a place macro form should not be subject to a complete macro-expansion (as a regular macro form). Only one round of expansion should be performed, and the results should be re-tried as a place macro. Otherwise an opportunity to expland a place macro will be missed. * share/txr/stdlib/place.tl (sys:pl-expand): Use macroexpand-1 rather than macroexpand. * txr.1: Documentation updated to make the new behavior clear. It's unlikely that anything in the world depends on this, so no backward compatibility switch is being provded to the old behavior. In situations where this makes a difference, the old behavior is likely too wrong to be useful. --- share/txr/stdlib/place.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/txr/stdlib/place.tl b/share/txr/stdlib/place.tl index 6437ac45..dbae39be 100644 --- a/share/txr/stdlib/place.tl +++ b/share/txr/stdlib/place.tl @@ -139,7 +139,7 @@ (sys:setq place (sys:set-macro-ancestor [pm-expander unex-place] unex-place)))) - (sys:setq place (macroexpand place env)) + (sys:setq place (macroexpand-1 place env)) (when (or (eq place unex-place) (null place) (and (atom place) (not (symbolp place))) -- cgit v1.2.3