diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 93a78fff2..1e30841a6 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,9 @@ +Thu Oct 2 19:33:38 1997 Mikael Djurfeldt + + * print.c (scm_iprin1): Don't print arguments of macro + transformers. (They are always: exp env.); Bugfix: Unmemoize + transformer source with correct environment. + 1997-10-02 Marius Vollmer Streamlining of call-with-dynamic-root: diff --git a/libguile/print.c b/libguile/print.c index c27250486..90411b371 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -348,7 +348,7 @@ taloop: || SCM_FALSEP (scm_printer_apply (SCM_PRINT_CLOSURE, exp, port, pstate))); { - SCM name, code; + SCM name, code, env; if (SCM_TYP16 (exp) == scm_tc16_macro) { /* Printing a macro. */ @@ -363,6 +363,7 @@ taloop: else { code = SCM_CODE (SCM_CDR (exp)); + env = SCM_ENV (SCM_CDR (exp)); scm_gen_puts (scm_regular_string, "#<", port); } if (SCM_CAR (exp) & (3L << 16)) @@ -377,6 +378,7 @@ taloop: /* Printing a closure. */ name = scm_procedure_name (exp); code = SCM_CODE (exp); + env = SCM_ENV (exp); scm_gen_puts (scm_regular_string, "#', port, pstate); - EXIT_NESTED_DATA (pstate); + if (SCM_PRINT_SOURCE_P) + { + code = scm_unmemocopy (code, + SCM_EXTEND_ENV (SCM_CAR (code), + SCM_EOL, + env)); + ENTER_NESTED_DATA (pstate, exp, circref); + scm_iprlist (" ", code, '>', port, pstate); + EXIT_NESTED_DATA (pstate); + } + else + { + if (SCM_TYP16 (exp) != scm_tc16_macro) + { + scm_gen_putc (' ', port); + scm_iprin1 (SCM_CAR (code), port, pstate); + } + scm_gen_putc ('>', port); + } } else scm_gen_putc ('>', port);