From: Stefan Monnier Date: Sat, 11 Dec 2004 21:59:15 +0000 (+0000) Subject: (Fforward_word): Avoid non-idempotent side-effects in macro arguments. X-Git-Tag: ttn-vms-21-2-B4~3325 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c096ae4d4eeb1890b3f76deab8f3c9835ae69121;p=emacs.git (Fforward_word): Avoid non-idempotent side-effects in macro arguments. --- diff --git a/src/syntax.c b/src/syntax.c index 8bfa62b49fc..fa34c2433c1 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -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;