Commit c096ae4d authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(Fforward_word): Avoid non-idempotent side-effects in macro arguments.

parent b28fc9ff
......@@ -1295,6 +1295,7 @@ and the function returns nil. Field boundaries are not noticed if
(arg)
Lisp_Object arg;
{
Lisp_Object tmp;
int orig_val, val;
if (NILP (arg))
......@@ -1307,8 +1308,9 @@ and the function returns nil. Field boundaries are not noticed if
val = XINT (arg) > 0 ? ZV : BEGV;
/* Avoid jumping out of an input field. */
val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT),
Qt, Qnil, Qnil));
tmp = Fconstrain_to_field (make_number (val), make_number (PT),
Qt, Qnil, Qnil);
val = XFASTINT (tmp);
SET_PT (val);
return val == orig_val ? Qt : Qnil;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment