diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-01-09 22:02:23 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-01-09 22:02:23 -0800 |
commit | d0c3ee7233765e807cf4c8a0615245ac6dcf8996 (patch) | |
tree | 5629d4a34da35006e97efc67cb6e70b77adbaa87 /eval.c | |
parent | 41e5183c51e48cd2854099159a173da10eb30b8b (diff) | |
download | txr-d0c3ee7233765e807cf4c8a0615245ac6dcf8996.tar.gz txr-d0c3ee7233765e807cf4c8a0615245ac6dcf8996.tar.bz2 txr-d0c3ee7233765e807cf4c8a0615245ac6dcf8996.zip |
Don't record form as its own macro origin.
* eval.c (set_origin): Add form != origin
to the condition for recording the ancestry.
(expand_macro): Use set_origin function instead
of direct call to sethash.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -223,7 +223,7 @@ val lookup_origin(val form) static val set_origin(val form, val origin) { - if (origin) + if (origin && form != origin) sethash(origin_hash, form, origin); return form; } @@ -1619,7 +1619,7 @@ static val expand_macro(val form, val mac_binding, val menv) result = eval_progn(body, exp_env, body); debug_end; set_dyn_env(saved_de); - sethash(origin_hash, result, form); + set_origin(result, form); debug_return(result); debug_leave; } |