changeset 27079:638b309011d9

(Fforward_word): Notice field boundaries only if inhibit-field-text-motion is nil.
author Gerd Moellmann <gerd@gnu.org>
date Sat, 01 Jan 2000 17:06:50 +0000
parents bedae2f61170
children b1afaefff576
files src/syntax.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.c	Sat Jan 01 17:06:26 2000 +0000
+++ b/src/syntax.c	Sat Jan 01 17:06:50 2000 +0000
@@ -1222,7 +1222,8 @@
   "Move point forward ARG words (backward if ARG is negative).\n\
 Normally returns t.\n\
 If an edge of the buffer or a field boundary is reached, point is left there\n\
-and the function returns nil.")
+and the function returns nil.  Field boundaries are not noticed if\n\
+`inhibit-field-text-motion' is non-nil.")
   (count)
      Lisp_Object count;
 {
@@ -1234,11 +1235,12 @@
     val = XINT (count) > 0 ? ZV : BEGV;
 
   /* Avoid jumping out of an input field.  */
-  val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT),
-				       Qt, Qnil));
+  if (NILP (Vinhibit_field_text_motion))
+    val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT),
+					 Qt, Qnil));
 
   SET_PT (val);
-  return (val == orig_val ? Qt : Qnil);
+  return val == orig_val ? Qt : Qnil;
 }
 
 Lisp_Object skip_chars ();