From b8855607a01da68a6974416add4cbf02784229df Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Sun, 17 Oct 1999 12:56:25 +0000 Subject: [PATCH] (Fforward_word): Supply new ESCAPE_FROM_EDGE parameter to Fconstrain_to_field. (Fforward_word): Likewise. Constrain to any field. --- src/syntax.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/syntax.c b/src/syntax.c index 7272cf38fd9..e321ffb0fe1 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1,5 +1,5 @@ /* GNU Emacs routines to deal with syntax tables; also word and list parsing. - Copyright (C) 1985, 87, 93, 94, 95, 97, 1998 Free Software Foundation, Inc. + Copyright (C) 1985, 87, 93, 94, 95, 97, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -1236,15 +1236,10 @@ and nil is returned.") return Qnil; } - /* If in a mini-buffer and moving backwards, stop at the end of the - prompt. This prevents accidentially moving into the read-only - prompt. */ - if (INTEGERP (current_buffer->prompt_end_charpos) - && (prompt_end = XINT (current_buffer->prompt_end_charpos), - ((PT > prompt_end && val < prompt_end) - || (PT < prompt_end && val > prompt_end)))) - val = prompt_end; - + /* Avoid jumping out of an input field. */ + val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT), + Qt, Qnil)); + SET_PT (val); return Qt; } -- 2.39.5