From 12fb80b857b4f4201f3724613b10ad9bcd80288a Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 21 Jul 2014 16:32:51 +0900 Subject: [PATCH] allow multiple identifier aliasing --- src/macro.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/macro.c b/src/macro.c index 7711a860..597eb57f 100644 --- a/src/macro.c +++ b/src/macro.c @@ -35,12 +35,7 @@ pic_find_rename(pic_state *pic, struct pic_senv *senv, pic_sym sym, pic_sym *ren { xh_entry *e; - if (! pic_interned_p(pic, sym)) { - if (rename != NULL) { - *rename = sym; - } - return true; - } + UNUSED(pic); if ((e = xh_get_int(&senv->map, sym)) == NULL) { return false; @@ -87,7 +82,12 @@ make_identifier(pic_state *pic, pic_sym sym, struct pic_senv *senv) break; senv = senv->up; } - return pic_gensym(pic, sym); + if (! pic_interned_p(pic, sym)) { + return sym; + } + else { + return pic_gensym(pic, sym); + } } static pic_value macroexpand(pic_state *, pic_value, struct pic_senv *);