From f888430a6012947a9aea3624592dff1fc1f18726 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 11 Jul 2015 07:28:47 -0700 Subject: Let's have placelet and placelet*. * share/txr/stdlib/place.tl (placelet*): New macro. * lisplib.c (place_set_entries): Add placelet* to list of names. * txr.1: Updated to document placelet* and fix mistakes. --- txr.1 | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index cbc37a1c..c2dc168d 100644 --- a/txr.1 +++ b/txr.1 @@ -28679,9 +28679,10 @@ applies inside a form. Of course, lexical operator macros do not shadow symbol macros under any circumstances. -.coNP Operator @ placelet +.coNP Macros @ placelet and @ placelet* .synb .mets (placelet >> ({( sym << place )}*) << body-form *) +.mets (placelet* >> ({( sym << place )}*) << body-form *) .syne .desc The @@ -28710,10 +28711,26 @@ scope of the This means that whenever .meta sym is evaluated, it stands for the value of the storage -location, and whenever a value is apprently stored into +location, and whenever a value is apparently stored into .metn sym , it is actually the storage location which receives it. +The +.code placelet* +variant implements an alternative scoping rule, which allows a later +.meta place +form to refer to a +.meta sym +bound to an earlier +.meta place +form. In other words, a given +.meta sym +binding is visible not only to the +.metn body-form -s +but also to +.meta place +forms which occur later. + Note: certain kinds of places, notably .cblk .meti (force << promise ) @@ -28735,7 +28752,7 @@ performs the syntactic substitution of symbol .code x by form .codn y , -whereever +wherever .code x appears inside .code z -- cgit v1.2.3