From c8ae68c761a3b40ec9023e12d3efed679cca4055 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 12 Jul 2015 07:11:09 -0700 Subject: * share/txr/stdlib/place.tl (place-form-p): New function. * lisplib.c (place_set_entries): Add place-form-p to list of names. --- ChangeLog | 6 ++++++ lisplib.c | 1 + share/txr/stdlib/place.tl | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index d4e45401..0a4a21d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-07-12 Kaz Kylheku + + * 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 Expand away sys:lisp1-value based on lexical info. diff --git a/lisplib.c b/lisplib.c index be437634..bc00b6a1 100644 --- a/lisplib.c +++ b/lisplib.c @@ -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)) -- cgit v1.2.3