eval-scheme command
authorBT Templeton <bt@hcoop.net>
Sat, 20 Jul 2013 21:35:16 +0000 (17:35 -0400)
committerRobin Templeton <robin@terpri.org>
Sun, 19 Apr 2015 07:43:01 +0000 (03:43 -0400)
* src/fns.c (Feval_scheme): New function.

src/fns.c

index 015fc8c..01c1f43 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -4489,6 +4489,19 @@ If BINARY is non-nil, returns a string in binary form.  */)
   return secure_hash (algorithm, object, start, end, Qnil, Qnil, binary);
 }
 \f
+DEFUN ("eval-scheme", Feval_scheme, Seval_scheme, 1, 1,
+       "sEval Scheme: ",
+       doc: /* Evaluate a string containing a Scheme expression.  */)
+  (Lisp_Object string)
+{
+  Lisp_Object tem;
+
+  CHECK_STRING (string);
+
+  tem = scm_c_eval_string (SSDATA (string));
+  return (INTERACTIVE ? Fprin1 (tem, Qt) : tem);
+}
+\f
 void
 init_fns_once (void)
 {