diff options
| author | Miles Bader | 2006-02-07 09:08:53 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-02-07 09:08:53 +0000 |
| commit | 42ab8e36acd651b047b82658802cbff53474dcaa (patch) | |
| tree | 90f81b00fd40aef5f5f1fc121bd0a3fcd6194533 /src | |
| parent | 6a80c3badc20ba801f0d908a7dc81db1b97113f0 (diff) | |
| download | emacs-42ab8e36acd651b047b82658802cbff53474dcaa.tar.gz emacs-42ab8e36acd651b047b82658802cbff53474dcaa.zip | |
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-51
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).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/editfns.c | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fd3bdb55a40..153a0baacbd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-02-08 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * editfns.c (Fconstrain_to_field): Use Fget_char_property instead | ||
| 4 | of Fget_text_property (other field functions word with overlays as | ||
| 5 | well as text-properties). | ||
| 6 | |||
| 1 | 2006-02-07 Kenichi Handa <handa@m17n.org> | 7 | 2006-02-07 Kenichi Handa <handa@m17n.org> |
| 2 | 8 | ||
| 3 | * dispextern.h (unibyte_display_via_language_environment): Extern | 9 | * dispextern.h (unibyte_display_via_language_environment): Extern |
diff --git a/src/editfns.c b/src/editfns.c index 37fe0f76752..b621397eda3 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -739,24 +739,24 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) | |||
| 739 | 739 | ||
| 740 | if (NILP (Vinhibit_field_text_motion) | 740 | if (NILP (Vinhibit_field_text_motion) |
| 741 | && !EQ (new_pos, old_pos) | 741 | && !EQ (new_pos, old_pos) |
| 742 | && (!NILP (Fget_text_property (new_pos, Qfield, Qnil)) | 742 | && (!NILP (Fget_char_property (new_pos, Qfield, Qnil)) |
| 743 | || !NILP (Fget_text_property (old_pos, Qfield, Qnil)) | 743 | || !NILP (Fget_char_property (old_pos, Qfield, Qnil)) |
| 744 | /* To recognize field boundaries, we must also look at the | 744 | /* To recognize field boundaries, we must also look at the |
| 745 | previous positions; we could use `get_pos_property' | 745 | previous positions; we could use `get_pos_property' |
| 746 | instead, but in itself that would fail inside non-sticky | 746 | instead, but in itself that would fail inside non-sticky |
| 747 | fields (like comint prompts). */ | 747 | fields (like comint prompts). */ |
| 748 | || (XFASTINT (new_pos) > BEGV | 748 | || (XFASTINT (new_pos) > BEGV |
| 749 | && !NILP (Fget_text_property (prev_new, Qfield, Qnil))) | 749 | && !NILP (Fget_char_property (prev_new, Qfield, Qnil))) |
| 750 | || (XFASTINT (old_pos) > BEGV | 750 | || (XFASTINT (old_pos) > BEGV |
| 751 | && !NILP (Fget_text_property (prev_old, Qfield, Qnil)))) | 751 | && !NILP (Fget_char_property (prev_old, Qfield, Qnil)))) |
| 752 | && (NILP (inhibit_capture_property) | 752 | && (NILP (inhibit_capture_property) |
| 753 | /* Field boundaries are again a problem; but now we must | 753 | /* Field boundaries are again a problem; but now we must |
| 754 | decide the case exactly, so we need to call | 754 | decide the case exactly, so we need to call |
| 755 | `get_pos_property' as well. */ | 755 | `get_pos_property' as well. */ |
| 756 | || (NILP (get_pos_property (old_pos, inhibit_capture_property, Qnil)) | 756 | || (NILP (get_pos_property (old_pos, inhibit_capture_property, Qnil)) |
| 757 | && (XFASTINT (old_pos) <= BEGV | 757 | && (XFASTINT (old_pos) <= BEGV |
| 758 | || NILP (Fget_text_property (old_pos, inhibit_capture_property, Qnil)) | 758 | || NILP (Fget_char_property (old_pos, inhibit_capture_property, Qnil)) |
| 759 | || NILP (Fget_text_property (prev_old, inhibit_capture_property, Qnil)))))) | 759 | || NILP (Fget_char_property (prev_old, inhibit_capture_property, Qnil)))))) |
| 760 | /* It is possible that NEW_POS is not within the same field as | 760 | /* It is possible that NEW_POS is not within the same field as |
| 761 | OLD_POS; try to move NEW_POS so that it is. */ | 761 | OLD_POS; try to move NEW_POS so that it is. */ |
| 762 | { | 762 | { |