changeset 26060:6edf64bf5e22

(Fforward_word): Supply new ESCAPE_FROM_EDGE parameter to Fconstrain_to_field. (Fforward_word): Likewise. Constrain to any field.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 17 Oct 1999 12:56:25 +0000
parents 2a7f35e0072b
children 1ca697674a40
files src/syntax.c
diffstat 1 files changed, 5 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.c	Sun Oct 17 12:55:49 1999 +0000
+++ b/src/syntax.c	Sun Oct 17 12:56:25 1999 +0000
@@ -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 @@
       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;
 }