[uim-commit] r3035 - branches/r5rs/sigscheme/src

yamaken at freedesktop.org yamaken at freedesktop.org
Sun Jan 29 20:50:27 PST 2006


Author: yamaken
Date: 2006-01-29 20:50:23 -0800 (Sun, 29 Jan 2006)
New Revision: 3035

Modified:
   branches/r5rs/sigscheme/src/main.c
Log:
* sigscheme/src/main.c
  - (repl_loop): Fix broken evaluation


Modified: branches/r5rs/sigscheme/src/main.c
===================================================================
--- branches/r5rs/sigscheme/src/main.c	2006-01-30 04:33:50 UTC (rev 3034)
+++ branches/r5rs/sigscheme/src/main.c	2006-01-30 04:50:23 UTC (rev 3035)
@@ -129,15 +129,6 @@
         if (EOFP(sexp))
             break;
 
-        SCM_EVAL_STATE_INIT1(eval_state, SCM_INTERACTION_ENV);
-        sexp = scm_s_srfi34_guard(cond_catch,
-                                  LIST_1(LIST_3(proc_eval,
-                                                sexp,
-                                                SCM_INTERACTION_ENV)),
-                                  &eval_state);
-        if (eval_state.ret_type == SCM_VALTYPE_NEED_EVAL)
-            sexp = EVAL(sexp, eval_state.env);
-
         /* parse error */
         if (EQ(sexp, err)) {
             cport = SCM_CHARPORT_DYNAMIC_CAST(ScmBaseCharPort,
@@ -159,13 +150,20 @@
          *         (else
          *          (%%inspect-error err)
          *          #<err>))
-         *   exp)
+         *   (eval exp (interaction-environment)))
          *
          * To allow redefinition of 'guard' and '%%inspect-err', surely access
          * them via symbol instead of prepared syntax or procedure object.
          */
-        result = EVAL(LIST_3(sym_guard, cond_catch, sexp),
-                      SCM_INTERACTION_ENV);
+        SCM_EVAL_STATE_INIT1(eval_state, SCM_INTERACTION_ENV);
+        result = scm_s_srfi34_guard(cond_catch,
+                                    LIST_1(LIST_3(proc_eval,
+                                                  sexp,
+                                                  SCM_INTERACTION_ENV)),
+                                    &eval_state);
+        if (eval_state.ret_type == SCM_VALTYPE_NEED_EVAL)
+            result = EVAL(result, eval_state.env);
+
         if (!EQ(result, err)) {
             SCM_WRITESS_TO_PORT(scm_out, result);
             scm_port_newline(scm_out);



More information about the uim-commit mailing list