summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bytecode.c2
-rw-r--r--src/eval.c21
-rw-r--r--src/lisp.h2
3 files changed, 8 insertions, 17 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index d484dbb25c6..3bb96c2ed2d 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -809,7 +809,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
{
Lisp_Object handler = POP;
/* Support for a function here is new in 24.4. */
- record_unwind_protect (FUNCTIONP (handler) ? bcall0 : unwind_body,
+ record_unwind_protect (FUNCTIONP (handler) ? bcall0 : prog_ignore,
handler);
NEXT;
}
diff --git a/src/eval.c b/src/eval.c
index ddcccc285d3..e50e26a11d2 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -453,11 +453,10 @@ usage: (progn BODY...) */)
return val;
}
-/* Evaluate BODY sequentially, discarding its value. Suitable for
- record_unwind_protect. */
+/* Evaluate BODY sequentially, discarding its value. */
void
-unwind_body (Lisp_Object body)
+prog_ignore (Lisp_Object body)
{
Fprogn (body);
}
@@ -469,16 +468,8 @@ whose values are discarded.
usage: (prog1 FIRST BODY...) */)
(Lisp_Object args)
{
- Lisp_Object val;
- Lisp_Object args_left;
-
- args_left = args;
- val = args;
-
- val = eval_sub (XCAR (args_left));
- while (CONSP (args_left = XCDR (args_left)))
- eval_sub (XCAR (args_left));
-
+ Lisp_Object val = eval_sub (XCAR (args));
+ prog_ignore (XCDR (args));
return val;
}
@@ -988,7 +979,7 @@ usage: (while TEST BODY...) */)
while (!NILP (eval_sub (test)))
{
QUIT;
- Fprogn (body);
+ prog_ignore (body);
}
return Qnil;
@@ -1191,7 +1182,7 @@ usage: (unwind-protect BODYFORM UNWINDFORMS...) */)
Lisp_Object val;
ptrdiff_t count = SPECPDL_INDEX ();
- record_unwind_protect (unwind_body, XCDR (args));
+ record_unwind_protect (prog_ignore, XCDR (args));
val = eval_sub (XCAR (args));
return unbind_to (count, val);
}
diff --git a/src/lisp.h b/src/lisp.h
index dc2c7a60085..1a586cab0d0 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3867,7 +3867,7 @@ extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object);
extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object);
extern void init_eval (void);
extern void syms_of_eval (void);
-extern void unwind_body (Lisp_Object);
+extern void prog_ignore (Lisp_Object);
extern ptrdiff_t record_in_backtrace (Lisp_Object, Lisp_Object *, ptrdiff_t);
extern void mark_specpdl (union specbinding *first, union specbinding *ptr);
extern void get_backtrace (Lisp_Object array);