]> code.delx.au - gnu-emacs/commitdiff
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-51
authorMiles Bader <miles@gnu.org>
Tue, 7 Feb 2006 09:08:53 +0000 (09:08 +0000)
committerMiles Bader <miles@gnu.org>
Tue, 7 Feb 2006 09:08:53 +0000 (09:08 +0000)
Make constrain-to-field notice overlays

2006-02-08  Miles Bader  <miles@gnu.org>

   * src/editfns.c (Fconstrain_to_field): Use Fget_char_property instead
   of Fget_text_property (other field functions word with overlays as
   well as text-properties).

src/ChangeLog
src/editfns.c

index fd3bdb55a4053782d3821266066ff8a288b76e96..153a0baacbd059cb3ffe3b1ddcd5f4280243eb7b 100644 (file)
@@ -1,3 +1,9 @@
+2006-02-08  Miles Bader  <miles@gnu.org>
+
+       * editfns.c (Fconstrain_to_field): Use Fget_char_property instead
+       of Fget_text_property (other field functions word with overlays as
+       well as text-properties).
+
 2006-02-07  Kenichi Handa  <handa@m17n.org>
 
        * dispextern.h (unibyte_display_via_language_environment): Extern
index 37fe0f76752361b4ca9dcaa2abd717352e758ff6..b621397eda338bf838da034c276a516a371a27f6 100644 (file)
@@ -739,24 +739,24 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil.  */)
   
   if (NILP (Vinhibit_field_text_motion)
       && !EQ (new_pos, old_pos)
-      && (!NILP (Fget_text_property (new_pos, Qfield, Qnil))
-          || !NILP (Fget_text_property (old_pos, Qfield, Qnil))
+      && (!NILP (Fget_char_property (new_pos, Qfield, Qnil))
+          || !NILP (Fget_char_property (old_pos, Qfield, Qnil))
           /* To recognize field boundaries, we must also look at the
              previous positions; we could use `get_pos_property'
              instead, but in itself that would fail inside non-sticky
              fields (like comint prompts).  */
           || (XFASTINT (new_pos) > BEGV
-              && !NILP (Fget_text_property (prev_new, Qfield, Qnil)))
+              && !NILP (Fget_char_property (prev_new, Qfield, Qnil)))
           || (XFASTINT (old_pos) > BEGV
-              && !NILP (Fget_text_property (prev_old, Qfield, Qnil))))
+              && !NILP (Fget_char_property (prev_old, Qfield, Qnil))))
       && (NILP (inhibit_capture_property)
           /* Field boundaries are again a problem; but now we must
              decide the case exactly, so we need to call
              `get_pos_property' as well.  */
           || (NILP (get_pos_property (old_pos, inhibit_capture_property, Qnil))
               && (XFASTINT (old_pos) <= BEGV
-                  || NILP (Fget_text_property (old_pos, inhibit_capture_property, Qnil))
-                  || NILP (Fget_text_property (prev_old, inhibit_capture_property, Qnil))))))
+                  || NILP (Fget_char_property (old_pos, inhibit_capture_property, Qnil))
+                  || NILP (Fget_char_property (prev_old, inhibit_capture_property, Qnil))))))
     /* It is possible that NEW_POS is not within the same field as
        OLD_POS; try to move NEW_POS so that it is.  */
     {