diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-06-11 15:08:29 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-06-11 15:08:29 -0700 |
commit | b20dfd43580bd97003521bbf046440519a0e94fc (patch) | |
tree | fce620dda5fc2a6f29a6eb2f455e3aa33dedad3b /eval.c | |
parent | baf432b1361709700002fdf9e81890301d693dee (diff) | |
download | txr-b20dfd43580bd97003521bbf046440519a0e94fc.tar.gz txr-b20dfd43580bd97003521bbf046440519a0e94fc.tar.bz2 txr-b20dfd43580bd97003521bbf046440519a0e94fc.zip |
defsymacro must remove special marking.
* eval.c (op_defsymacro): Remove sym from the special
hash, unless compatibility 143 or lower is requested.
* txr.1: Document effects of evaluating defsymacro
if a global variable of the same name exists, and the
behavior in lexical scopes where sym is bound.
Added compatibility notes covering the code change.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1567,6 +1567,8 @@ static val op_defsymacro(val form, val env) eval_error(form, lit("let: ~s is not a bindable symbol"), sym, nao); remhash(top_vb, sym); + if (!opt_compat || opt_compat > 143) + remhash(special, sym); sethash(top_smb, sym, cons(sym, second(args))); return sym; } |