diff options
| author | Stefan Monnier | 2004-12-11 21:59:15 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-12-11 21:59:15 +0000 |
| commit | c096ae4d4eeb1890b3f76deab8f3c9835ae69121 (patch) | |
| tree | dc99c1dc22628c58b5b921fef8120b75474897ec /src/syntax.c | |
| parent | b28fc9ff5b31493036df23bb75ebec9b4f9dd672 (diff) | |
| download | emacs-c096ae4d4eeb1890b3f76deab8f3c9835ae69121.tar.gz emacs-c096ae4d4eeb1890b3f76deab8f3c9835ae69121.zip | |
(Fforward_word): Avoid non-idempotent side-effects in macro arguments.
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 | |||
| 1295 | (arg) | 1295 | (arg) |
| 1296 | Lisp_Object arg; | 1296 | Lisp_Object arg; |
| 1297 | { | 1297 | { |
| 1298 | Lisp_Object tmp; | ||
| 1298 | int orig_val, val; | 1299 | int orig_val, val; |
| 1299 | 1300 | ||
| 1300 | if (NILP (arg)) | 1301 | if (NILP (arg)) |
| @@ -1307,8 +1308,9 @@ and the function returns nil. Field boundaries are not noticed if | |||
| 1307 | val = XINT (arg) > 0 ? ZV : BEGV; | 1308 | val = XINT (arg) > 0 ? ZV : BEGV; |
| 1308 | 1309 | ||
| 1309 | /* Avoid jumping out of an input field. */ | 1310 | /* Avoid jumping out of an input field. */ |
| 1310 | val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT), | 1311 | tmp = Fconstrain_to_field (make_number (val), make_number (PT), |
| 1311 | Qt, Qnil, Qnil)); | 1312 | Qt, Qnil, Qnil); |
| 1313 | val = XFASTINT (tmp); | ||
| 1312 | 1314 | ||
| 1313 | SET_PT (val); | 1315 | SET_PT (val); |
| 1314 | return val == orig_val ? Qt : Qnil; | 1316 | return val == orig_val ? Qt : Qnil; |