diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-12-08 21:34:13 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-12-08 21:34:13 -0800 |
commit | a6022e54d73dc294b357d5e5352aed331d9585e3 (patch) | |
tree | c2e5611f5379b3310bdf1d931b76305961da4305 /txr.1 | |
parent | ddbf5c05006e113608ac3c57f6d403bdebcc20a5 (diff) | |
download | txr-a6022e54d73dc294b357d5e5352aed331d9585e3.tar.gz txr-a6022e54d73dc294b357d5e5352aed331d9585e3.tar.bz2 txr-a6022e54d73dc294b357d5e5352aed331d9585e3.zip |
Allow defmacros and defuns to co-exist.
Already we have the situation that there is an if function and
an if macro, and same for and and or.
This change allows such situations to be programmer-defined.
* eval.c (op_defun): Don't remhash the name from the toplevel
macro bindings.
(op-defmacro): Don't remhash the name from the toplevel
function bindings.
* txr.1: Document the permissive behavior as dialect notes
under defmacro and defun.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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 |