aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBT Templeton <[email protected]>2013-08-23 02:32:49 -0400
committerRobin Templeton <[email protected]>2015-04-19 03:43:02 -0400
commit19411656ce2ada9b559362b71a7bff56a1095a96 (patch)
treec253b54621ba96ac69a8f2f95a1ed4492f3b75c9 /src
parent62947569a1716052da3e63d93a8289dd103a51e3 (diff)
* src/eval.c (Fbind_symbol): New function.
Diffstat (limited to 'src')
-rw-r--r--src/eval.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index d1397e0ab2..b34e692f85 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2265,6 +2265,18 @@ DEFUN ("values", Fvalues, Svalues, 0, MANY, 0,
return scm_c_values (args, nargs);
}
+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;
+}
+
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.