* src/eval.c (Fbind_symbol): New function.
authorBT Templeton <bt@hcoop.net>
Fri, 23 Aug 2013 06:32:49 +0000 (02:32 -0400)
committerRobin Templeton <robin@terpri.org>
Sun, 19 Apr 2015 07:43:02 +0000 (03:43 -0400)
src/eval.c

index d1397e0..b34e692 100644 (file)
@@ -2265,6 +2265,18 @@ DEFUN ("values", Fvalues, Svalues, 0, MANY, 0,
   return scm_c_values (args, nargs);
 }
 \f
+DEFUN ("bind-symbol", Fbind_symbol, Sbind_symbol, 3, 3, 0,
+       doc: /* Bind symbol.  */)
+  (Lisp_Object symbol, Lisp_Object value, Lisp_Object thunk)
+{
+  Lisp_Object val;
+  dynwind_begin ();
+  specbind (symbol, value);
+  val = call0 (thunk);
+  dynwind_end ();
+  return val;
+}
+\f
 DEFUN ("apply", Fapply, Sapply, 1, MANY, 0,
        doc: /* Call FUNCTION with our remaining args, using our last arg as list of args.
 Then return the value FUNCTION returns.