From abb749f59f9dfd158c8192baed0038954439e075 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 21 Oct 2019 20:43:19 -0700 Subject: [PATCH] Be more careful when checking for unquote in repl eval. --- src/runtime/rep.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/rep.scm b/src/runtime/rep.scm index 48f2cbe9f..da9b09f5b 100644 --- a/src/runtime/rep.scm +++ b/src/runtime/rep.scm @@ -476,7 +476,9 @@ USA. (define hook/repl-eval) (define (default/repl-eval s-expression environment repl) (if (and (pair? s-expression) - (eq? 'unquote (car s-expression))) + (eq? 'unquote (car s-expression)) + (pair? (cdr s-expression)) + (null? (cddr s-expression))) (let ((env (->environment '(user)))) (%repl-scode-eval (syntax (cadr s-expression) env) env repl)) (%repl-scode-eval (syntax s-expression environment) environment repl))) -- 2.25.1