aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorKároly Lőrentey2006-01-26 03:12:45 +0000
committerKároly Lőrentey2006-01-26 03:12:45 +0000
commit2cb3aec40ba29dc8c3d160580405cc2e5a2efdad (patch)
tree76fa46b4c9a31266c08a7bee92f1dd9fdc565f52 /src/editfns.c
parent27806b2030d6a33315ed914e0408b0bd80138cd8 (diff)
downloademacs-2cb3aec40ba29dc8c3d160580405cc2e5a2efdad.tar.gz
emacs-2cb3aec40ba29dc8c3d160580405cc2e5a2efdad.zip
(Fconstrain_to_field): Use get_pos_property, not Fget_char_property,
to fix handling of field boundaries. Fix bogus comment. (Fline_beginning_position, Fline_end_position): Clarify confusing doc string.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 5605a25bdd2..1ee7c968884 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -727,12 +727,12 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
727 727
728 if (NILP (Vinhibit_field_text_motion) 728 if (NILP (Vinhibit_field_text_motion)
729 && !EQ (new_pos, old_pos) 729 && !EQ (new_pos, old_pos)
730 && (!NILP (Fget_char_property (new_pos, Qfield, Qnil)) 730 && (!NILP (get_pos_property (new_pos, Qfield, Qnil))
731 || !NILP (Fget_char_property (old_pos, Qfield, Qnil))) 731 || !NILP (get_pos_property (old_pos, Qfield, Qnil)))
732 && (NILP (inhibit_capture_property) 732 && (NILP (inhibit_capture_property)
733 || NILP (Fget_char_property(old_pos, inhibit_capture_property, Qnil)))) 733 || NILP (get_pos_property (old_pos, inhibit_capture_property, Qnil))))
734 /* NEW_POS is not within the same field as OLD_POS; try to 734 /* It is possible that NEW_POS is not within the same field as
735 move NEW_POS so that it is. */ 735 OLD_POS; try to move NEW_POS so that it is. */
736 { 736 {
737 int fwd, shortage; 737 int fwd, shortage;
738 Lisp_Object field_bound; 738 Lisp_Object field_bound;
@@ -782,9 +782,10 @@ DEFUN ("line-beginning-position",
782With argument N not nil or 1, move forward N - 1 lines first. 782With argument N not nil or 1, move forward N - 1 lines first.
783If scan reaches end of buffer, return that position. 783If scan reaches end of buffer, return that position.
784 784
785The scan does not cross a field boundary unless doing so would move 785This function constrains the returned position to the current field
786beyond there to a different line; if N is nil or 1, and scan starts at a 786unless that would be on a different line than the original,
787field boundary, the scan stops as soon as it starts. To ignore field 787unconstrained result. If N is nil or 1, and a front-sticky field
788starts at point, the scan stops as soon as it starts. To ignore field
788boundaries bind `inhibit-field-text-motion' to t. 789boundaries bind `inhibit-field-text-motion' to t.
789 790
790This function does not move point. */) 791This function does not move point. */)
@@ -816,9 +817,10 @@ DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0,
816With argument N not nil or 1, move forward N - 1 lines first. 817With argument N not nil or 1, move forward N - 1 lines first.
817If scan reaches end of buffer, return that position. 818If scan reaches end of buffer, return that position.
818 819
819The scan does not cross a field boundary unless doing so would move 820This function constrains the returned position to the current field
820beyond there to a different line; if N is nil or 1, and scan starts at a 821unless that would be on a different line than the original,
821field boundary, the scan stops as soon as it starts. To ignore field 822unconstrained result. If N is nil or 1, and a rear-sticky field ends
823at point, the scan stops as soon as it starts. To ignore field
822boundaries bind `inhibit-field-text-motion' to t. 824boundaries bind `inhibit-field-text-motion' to t.
823 825
824This function does not move point. */) 826This function does not move point. */)