# HG changeset patch # User Miles Bader # Date 1139303333 0 # Node ID 82590f3df5774009551e1dc3c42f94477fed6c3c # Parent 199e5d9a013836a711e9b06bf4bcb917a4e83b99 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-51 Make constrain-to-field notice overlays 2006-02-08 Miles Bader * 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). diff -r 199e5d9a0138 -r 82590f3df577 src/ChangeLog --- a/src/ChangeLog Tue Feb 07 08:01:08 2006 +0000 +++ b/src/ChangeLog Tue Feb 07 09:08:53 2006 +0000 @@ -1,3 +1,9 @@ +2006-02-08 Miles Bader + + * 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 * dispextern.h (unibyte_display_via_language_environment): Extern diff -r 199e5d9a0138 -r 82590f3df577 src/editfns.c --- a/src/editfns.c Tue Feb 07 08:01:08 2006 +0000 +++ b/src/editfns.c Tue Feb 07 09:08:53 2006 +0000 @@ -739,24 +739,24 @@ 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. */ {