aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorDmitry Antipov2013-02-20 09:18:20 +0400
committerDmitry Antipov2013-02-20 09:18:20 +0400
commit2a14a4f13cdb22f5b6b0840081d977c8d38a91e6 (patch)
tree06dd7c36007f50d291a9443aa0f6901c65c2f4b8 /src/editfns.c
parent1dfcc79e83d3db031b45e9f6b9314dc1f0697b1d (diff)
downloademacs-2a14a4f13cdb22f5b6b0840081d977c8d38a91e6.tar.gz
emacs-2a14a4f13cdb22f5b6b0840081d977c8d38a91e6.zip
* search.c (find_newline): Return byte position in bytepos.
Adjust comment. (find_next_newline_no_quit, find_before_next_newline): Add bytepos argument. * lisp.h (find_newline, find_next_newline_no_quit) (find_before_next_newline): Adjust prototypes. * bidi.c (bidi_find_paragraph_start): * editfns.c (Fconstrain_to_field, Fline_end_position): * indent.c (compute_motion, vmotion): * xdisp.c (back_to_previous_line_start, forward_to_next_line_start): (get_visually_first_element, move_it_vertically_backward): Adjust users and avoid calls to CHAR_TO_BYTE where appropriate.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/editfns.c b/src/editfns.c
index bee0bcc158d..831c8359fab 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -736,7 +736,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
736 FIELD_BOUND are on the same line by seeing whether 736 FIELD_BOUND are on the same line by seeing whether
737 there's an intervening newline or not. */ 737 there's an intervening newline or not. */
738 || (find_newline (XFASTINT (new_pos), XFASTINT (field_bound), 738 || (find_newline (XFASTINT (new_pos), XFASTINT (field_bound),
739 fwd ? -1 : 1, &shortage, 1), 739 fwd ? -1 : 1, &shortage, NULL, 1),
740 shortage != 0))) 740 shortage != 0)))
741 /* Constrain NEW_POS to FIELD_BOUND. */ 741 /* Constrain NEW_POS to FIELD_BOUND. */
742 new_pos = field_bound; 742 new_pos = field_bound;
@@ -821,7 +821,8 @@ This function does not move point. */)
821 CHECK_NUMBER (n); 821 CHECK_NUMBER (n);
822 822
823 clipped_n = clip_to_bounds (PTRDIFF_MIN + 1, XINT (n), PTRDIFF_MAX); 823 clipped_n = clip_to_bounds (PTRDIFF_MIN + 1, XINT (n), PTRDIFF_MAX);
824 end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0)); 824 end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0),
825 NULL);
825 826
826 /* Return END_POS constrained to the current input field. */ 827 /* Return END_POS constrained to the current input field. */
827 return Fconstrain_to_field (make_number (end_pos), make_number (orig), 828 return Fconstrain_to_field (make_number (end_pos), make_number (orig),