]> code.delx.au - gnu-emacs/commitdiff
(Fconstrain_to_field): Use get_pos_property, not Fget_char_property,
authorKároly Lőrentey <lorentey@elte.hu>
Thu, 26 Jan 2006 03:12:45 +0000 (03:12 +0000)
committerKároly Lőrentey <lorentey@elte.hu>
Thu, 26 Jan 2006 03:12:45 +0000 (03:12 +0000)
to fix handling of field boundaries.  Fix bogus comment.
(Fline_beginning_position, Fline_end_position): Clarify confusing doc
string.

src/ChangeLog
src/editfns.c

index 001bbf23e9a61daf965ed99566f0822d12659837..9829d7162da531ae6b53939802e212a4cb330cff 100644 (file)
@@ -1,3 +1,13 @@
+2006-01-26  L\e$,1 q\e(Brentey K\e,Aa\e(Broly  <lorentey@elte.hu>
+
+       * editfns.c (Fconstrain_to_field): Use get_pos_property, not
+       Fget_char_property.  Fix bogus comment.
+       (Fline_beginning_position, Fline_end_position): Clarify 
+       confusing doc string.
+
+       * cmds.c (Fbeginning_of_line, Fend_of_line): Clarify confusing doc
+       string.
+
 2006-01-26  Kenichi Handa  <handa@m17n.org>
 
        * callproc.c (Fcall_process): GCPRO error_file.  Encode infile,
index 5605a25bdd2ec6561c076b11d466ba4e98dd04d8..1ee7c968884a834d807754645f060aa49e3f8a21 100644 (file)
@@ -727,12 +727,12 @@ 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_char_property (new_pos, Qfield, Qnil))
-         || !NILP (Fget_char_property (old_pos, Qfield, Qnil)))
+      && (!NILP (get_pos_property (new_pos, Qfield, Qnil))
+          || !NILP (get_pos_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
-       move NEW_POS so that it is.  */
+         || NILP (get_pos_property (old_pos, 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.  */
     {
       int fwd, shortage;
       Lisp_Object field_bound;
@@ -782,9 +782,10 @@ DEFUN ("line-beginning-position",
 With argument N not nil or 1, move forward N - 1 lines first.
 If scan reaches end of buffer, return that position.
 
-The scan does not cross a field boundary unless doing so would move
-beyond there to a different line; if N is nil or 1, and scan starts at a
-field boundary, the scan stops as soon as it starts.  To ignore field
+This function constrains the returned position to the current field
+unless that would be on a different line than the original,
+unconstrained result.  If N is nil or 1, and a front-sticky field
+starts at point, the scan stops as soon as it starts.  To ignore field
 boundaries bind `inhibit-field-text-motion' to t.
 
 This function does not move point.  */)
@@ -816,9 +817,10 @@ DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0,
 With argument N not nil or 1, move forward N - 1 lines first.
 If scan reaches end of buffer, return that position.
 
-The scan does not cross a field boundary unless doing so would move
-beyond there to a different line; if N is nil or 1, and scan starts at a
-field boundary, the scan stops as soon as it starts.  To ignore field
+This function constrains the returned position to the current field
+unless that would be on a different line than the original,
+unconstrained result.  If N is nil or 1, and a rear-sticky field ends
+at point, the scan stops as soon as it starts.  To ignore field
 boundaries bind `inhibit-field-text-motion' to t.
 
 This function does not move point.  */)