diff options
-rw-r--r-- | eval.c | 16 | ||||
-rw-r--r-- | txr.1 | 32 |
2 files changed, 46 insertions, 2 deletions
@@ -6300,7 +6300,21 @@ val mboundp(val sym) val special_operator_p(val sym) { - return if2(gethash(op_table, sym), t); + val fun = gethash(op_table, sym); + + if (fun) { + opfun_t fp = coerce(opfun_t, cptr_get(fun)); + + if (fp == op_error || fp == op_meta_error || + fp == op_qquote_error || fp == op_unquote_error) + { + return nil; + } + + return t; + } + + return nil; } static val makunbound(val sym) @@ -20497,6 +20497,21 @@ if is a symbol which names a special operator, otherwise it returns .codn nil . +Certain operator symbols are not understood as special operators, +and not reported as such by this function. + +The operators +.codn macrolet , +.code symacrolet +and +.code expander-let +are completely consumed by the macro expander, and do not appear +in its output. Therefore they are never seen by evaluation or compilation +and are not special operators for that reason. + +The unquoting and splicing operators in quasiquote syntax also aren't special +operators. They are a notation recognized by the quasiquoting macro. + .coNP Symbol Macro @ %fun% .desc The symbol macro @@ -42436,6 +42451,11 @@ When another macro is tried, the process repeats, resulting in a search which proceeds as far as possible through outer lexical scopes and finally the global scope. +The +.code symacrolet +symbol isn't a special operator, and is not reported as such by +.codn special-operator-p . + .coNP Function @ macro-form-p .synb .mets (macro-form-p < obj <> [ env ]) @@ -43324,6 +43344,11 @@ applies inside a form. Lexical operator macros do not shadow symbol macros under any circumstances. +The +.code symacrolet +symbol isn't a special operator, and is not reported as such by +.codn special-operator-p . + .coNP Macros @ placelet and @ placelet* .synb .mets (placelet >> ({( sym << place )}*) << body-form *) @@ -43465,7 +43490,7 @@ emanating from the .code delta form. -.coNP Macro @ expander-let +.coNP Operator @ expander-let .synb .mets (expander-let >> ({( sym << init-form )}*) << body-form *) .syne @@ -43519,6 +43544,11 @@ A macro may generate an .code expander-let form in order to communicate values to macros contained in that form. +The +.code expander-let +symbol isn't a special operator, and is not reported as such by +.codn special-operator-p . + .coNP Macro @ macro-time .synb .mets (macro-time << form *) |