diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-02-10 06:50:26 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-02-10 06:50:26 -0800 |
commit | bdefeae949effdbf45dfbf14475b2b795ef50cb2 (patch) | |
tree | 22c87c6176f56be42a6acdce3ab644e1d7b3126f /txr.1 | |
parent | 8da2bf1c19a197df13928c18cd8e4317b9934c66 (diff) | |
download | txr-bdefeae949effdbf45dfbf14475b2b795ef50cb2.tar.gz txr-bdefeae949effdbf45dfbf14475b2b795ef50cb2.tar.bz2 txr-bdefeae949effdbf45dfbf14475b2b795ef50cb2.zip |
* eval.c (symacro_k, fun_k): New keyword variables.
(lexical_lisp1_binding): New static function.
(eval_init): Initialize symacro_k and fun_k; register
new intrinsic function lexical-lisp1-binding.
* match.h (var_k): Existing external name declared.
* txr.1: Documented lexical-lisp1-binding.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -26151,6 +26151,42 @@ However, it can be macro-expanded to .code x which is a lexical variable. +.coNP Function @ lexical-lisp1-binding +.synb +.mets (lexical-lisp1-binding < env << symbol) +.syne +.desc +The +.code lexical-lisp1-binding +function inspects the macro-time environment +.meta env +to determine what kind of binding, if any, does +.meta symbol +have in that environment, from a Lisp-1 perspective. + +That is to say, it considers function bindings, variable bindings +and symbol macro bindings to be in a single name space and finds +the innermost binding of one of these types for +.metn symbol . + +If such a binding is found, then the function returns one of +the three keyword symbols +.codn :var , +.codn :fun , +or +.codn :symacro . + +If no such lexical binding is found, then the function +returns +.codn nil . + +Note that a +.code nil +return doesn't mean that the symbol doesn't have a lexical binding. It could +have an operator macro lexical binding (a macro binding in the function +namespace established by +.codn macrolet ). + .coNP Operator @ defsymacro .synb .mets (defsymacro < sym << form ) |