diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-04-13 20:00:31 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-04-13 20:00:31 -0700 |
commit | b6403cfaa935cd7b144cb6c1c15ba9cfacd73441 (patch) | |
tree | a10696d50af4a19b7551c2a73a43c003c5d0bdac | |
parent | d32108aad0575f904286c37146906fba4409c4de (diff) | |
download | txr-b6403cfaa935cd7b144cb6c1c15ba9cfacd73441.tar.gz txr-b6403cfaa935cd7b144cb6c1c15ba9cfacd73441.tar.bz2 txr-b6403cfaa935cd7b144cb6c1c15ba9cfacd73441.zip |
Bugfix: track origin for built-in macros.
This fix is no longer that important, since due to the
previous commit, expand now tracks expansion origins
thoroughly, which hides this bug. However, expand_macro is
directly called from a few other functions, like macroexpand,
which don't benefit from that fix.
* eval.c (expand_macro): Add forgotten set_origin call
in the case when the native C expander is called.
-rw-r--r-- | eval.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1602,6 +1602,7 @@ static val expand_macro(val form, val mac_binding, val menv) if (cobjp(expander)) { mefun_t fp = coerce(mefun_t, cptr_get(expander)); val expanded = fp(form, menv); + set_origin(expanded, form); return expanded; } else { debug_enter; |