diff options
-rw-r--r-- | eval.c | 3 | ||||
-rw-r--r-- | txr.1 | 14 |
2 files changed, 14 insertions, 3 deletions
@@ -1523,8 +1523,6 @@ static val op_defun(val form, val env) val block = cons(block_s, cons(name, body)); val fun = cons(name, cons(params, cons(block, nil))); - remhash(top_mb, name); - /* defun captures lexical environment, so env is passed */ sethash(top_fb, name, cons(name, func_interp(env, fun))); if (eval_initing) @@ -1557,7 +1555,6 @@ static val op_defmacro(val form, val env) if (gethash(op_table, name)) eval_error(form, lit("defmacro: ~s is a special operator"), name, nao); - remhash(top_fb, name); /* defmacro captures lexical environment, so env is passed */ sethash(top_mb, name, rlcp_tree(cons(name, cons(env, cons(params, cons(block, nil)))), @@ -10964,6 +10964,13 @@ syntax. In ANSI Common Lisp, keywords may be used as function names. In TXR Lisp, they may not. +.TP* "Dialect Note:" +A function defined by +.code defun +may co-exist with a macro defined by +.codn defmacro . +This is not permitted in ANSI Common Lisp. + .coNP Operator @ lambda .synb .mets (lambda <> ( param * [: << opt-param *] [. << rest-param ]) @@ -23202,6 +23209,13 @@ The return value of the macro is the macro expansion. It is substituted in place of the entire macro call form. That form is then expanded again; it may itself be another macro call, or contain more macro calls. +.TP* "Dialect Note:" +A macro in the global namespace introduced by +.code defmacro +may co-exist with a function of the same name introduced by +.codn defun . +This is not permitted in ANSI Common Lisp. + .TP* Example: .cblk |