From 705d72105f792e7c4b34412fcfdfecfefaba56b8 Mon Sep 17 00:00:00 2001 From: Robin Templeton Date: Thu, 7 Aug 2014 17:14:10 -0400 Subject: [PATCH] use guile-elisp macroexpansion --- src/lread.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/lread.c b/src/lread.c index a79b5e1df8..f37535af5f 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1813,17 +1813,12 @@ readevalloop (Lisp_Object readcharfun, bool whole_buffer = 0; /* True on the first time around. */ bool first_sexp = 1; - Lisp_Object macroexpand = intern ("internal-macroexpand-for-load"); - - if (NILP (Ffboundp (macroexpand)) - /* Don't macroexpand in .elc files, since it should have been done - already. We actually don't know whether we're in a .elc file or not, - so we use circumstantial evidence: .el files normally go through - Vload_source_file_function -> load-with-code-conversion - -> eval-buffer. */ - || EQ (readcharfun, Qget_file_char) - || EQ (readcharfun, Qget_emacs_mule_file_char)) - macroexpand = Qnil; + Lisp_Object form = Fcons (Qprogn, Qnil); + Lisp_Object tail = form; + Lisp_Object compile_fn = 0; + + if (SCM_UNLIKELY (! compile_fn)) + compile_fn = scm_c_public_ref ("language elisp runtime", "compile-elisp"); if (MARKERP (readcharfun)) { @@ -1952,11 +1947,7 @@ readevalloop (Lisp_Object readcharfun, /* Restore saved point and BEGV. */ dynwind_end (); - /* Now eval what we just read. */ - if (!NILP (macroexpand)) - val = readevalloop_eager_expand_eval (val, macroexpand); - else - val = eval_sub (val); + tail = Fsetcdr (tail, Fcons (val, Qnil)); if (printflag) { @@ -1970,6 +1961,8 @@ readevalloop (Lisp_Object readcharfun, first_sexp = 0; } + eval_sub (form); + build_load_history (sourcename, stream || whole_buffer); -- 2.20.1