]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fconstrain_to_field): Check carefully for field boundaries if either
authorMiles Bader <miles@gnu.org>
Mon, 16 Oct 2000 07:28:24 +0000 (07:28 +0000)
committerMiles Bader <miles@gnu.org>
Mon, 16 Oct 2000 07:28:24 +0000 (07:28 +0000)
OLD_POS or NEW_POS has a non-nil field property, even if they're the same.

src/ChangeLog
src/editfns.c

index f224dc1930be5c53bc0a3045cac5adbbd1616e42..39d7e0d7450fb6b3355c32976f066777a54950e6 100644 (file)
@@ -1,3 +1,9 @@
+2000-10-16  Miles Bader  <miles@lsi.nec.co.jp>
+
+       * editfns.c (Fconstrain_to_field): Check carefully for field
+       boundaries if either OLD_POS or NEW_POS has a non-nil field
+       property, even if they're the same.
+
 2000-10-16  Kenichi Handa  <handa@etl.go.jp>
 
        * xterm.c (x_draw_box_rect): Fix the calculation of width and
index 4f7a7c7db1f644b4f0f95ddb4b3ee19fdeada9c0..57dbdaae0ccfd720f87e3a75713d23ab186de16d 100644 (file)
@@ -612,7 +612,8 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil.")
 
   if (NILP (Vinhibit_field_text_motion)
       && !EQ (new_pos, old_pos)
-      && !char_property_eq (Qfield, new_pos, old_pos)
+      && (!NILP (Fget_char_property (new_pos, Qfield, Qnil))
+         || !NILP (Fget_char_property (old_pos, Qfield, Qnil)))
       && (NILP (inhibit_capture_property)
          || NILP (Fget_char_property(old_pos, inhibit_capture_property, Qnil))))
     /* NEW_POS is not within the same field as OLD_POS; try to