1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 15:06:22 +00:00

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

This commit is contained in:
Stefan Monnier 2004-12-11 21:59:15 +00:00
parent b28fc9ff5b
commit c096ae4d4e

View File

@ -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;