From 2a14a4f13cdb22f5b6b0840081d977c8d38a91e6 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 20 Feb 2013 09:18:20 +0400 Subject: * 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. --- src/editfns.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/editfns.c') 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. */) FIELD_BOUND are on the same line by seeing whether there's an intervening newline or not. */ || (find_newline (XFASTINT (new_pos), XFASTINT (field_bound), - fwd ? -1 : 1, &shortage, 1), + fwd ? -1 : 1, &shortage, NULL, 1), shortage != 0))) /* Constrain NEW_POS to FIELD_BOUND. */ new_pos = field_bound; @@ -821,7 +821,8 @@ This function does not move point. */) CHECK_NUMBER (n); clipped_n = clip_to_bounds (PTRDIFF_MIN + 1, XINT (n), PTRDIFF_MAX); - end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0)); + end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0), + NULL); /* Return END_POS constrained to the current input field. */ return Fconstrain_to_field (make_number (end_pos), make_number (orig), -- cgit v1.2.3