diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-07-12 07:11:09 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-07-12 07:11:09 -0700 |
commit | c8ae68c761a3b40ec9023e12d3efed679cca4055 (patch) | |
tree | 532a812c43249d0e1111626a9d6a0fae65155a1d | |
parent | 11e1c6cf7531d3a52955651c65cf880de3eed46c (diff) | |
download | txr-c8ae68c761a3b40ec9023e12d3efed679cca4055.tar.gz txr-c8ae68c761a3b40ec9023e12d3efed679cca4055.tar.bz2 txr-c8ae68c761a3b40ec9023e12d3efed679cca4055.zip |
* share/txr/stdlib/place.tl (place-form-p): New function.
* lisplib.c (place_set_entries): Add place-form-p to list of names.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lisplib.c | 1 | ||||
-rw-r--r-- | share/txr/stdlib/place.tl | 5 |
3 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2015-07-12 Kaz Kylheku <kaz@kylheku.com> + + * share/txr/stdlib/place.tl (place-form-p): New function. + + * lisplib.c (place_set_entries): Add place-form-p to list of names. + 2015-07-11 Kaz Kylheku <kaz@kylheku.com> Expand away sys:lisp1-value based on lexical info. @@ -59,6 +59,7 @@ static val place_set_entries(val dlt, val fun) lit("*place-delete-expander*"), lit("get-update-expander"), lit("get-clobber-expander"), lit("get-delete-expander"), + lit("place-form-p"), lit("rlet"), lit("with-gensyms"), lit("call-update-expander"), lit("call-clobber-expander"), lit("call-delete-expander)"), diff --git a/share/txr/stdlib/place.tl b/share/txr/stdlib/place.tl index 7bb059a8..f7e468cf 100644 --- a/share/txr/stdlib/place.tl +++ b/share/txr/stdlib/place.tl @@ -82,6 +82,11 @@ (makunbound ',',place-expr)))) ,*op-body)) + (defun place-form-p (place) + (when (or (bindable place) + (and (consp place) [*place-update-expander* (car place)])) + t)) + (defun get-update-expander (place) (cond ((symbolp place) (fun sys:sym-update-expander)) |