Commit ffc65bee authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* lisp.h (find_next_newline_no_quit): Rename to find_next_newline.

* xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
(get_visually_first_element, move_it_vertically_backward): Ajust users.
* bidi.c (bidi_find_paragraph_start): Likewise.
* indent.c (vmotion): Likewise.
parent 70743157
2013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
* lisp.h (find_next_newline_no_quit): Rename to find_next_newline.
* xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
(get_visually_first_element, move_it_vertically_backward): Ajust users.
* bidi.c (bidi_find_paragraph_start): Likewise.
* indent.c (vmotion): Likewise.
2013-03-05 Paul Eggert <eggert@cs.ucla.edu>
 
FILE's lock is now always .#FILE and may be a regular file (Bug#13807).
......
......@@ -1108,7 +1108,7 @@ bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t pos_byte)
display string? And what if a display string covering some
of the text over which we scan back includes
paragraph_start_re? */
pos = find_next_newline_no_quit (pos - 1, -1, &pos_byte);
pos = find_next_newline (pos - 1, -1, &pos_byte);
if (n >= MAX_PARAGRAPH_SEARCH)
pos_byte = BEGV_BYTE;
return pos_byte;
......
......@@ -1843,7 +1843,7 @@ vmotion (register ptrdiff_t from, register EMACS_INT vtarget, struct window *w)
ptrdiff_t bytepos;
Lisp_Object propval;
prevline = find_next_newline_no_quit (from - 1, -1, &bytepos);
prevline = find_next_newline (from - 1, -1, &bytepos);
while (prevline > BEGV
&& ((selective > 0
&& indented_beyond_p (prevline, bytepos, selective))
......@@ -1853,7 +1853,7 @@ vmotion (register ptrdiff_t from, register EMACS_INT vtarget, struct window *w)
Qinvisible,
text_prop_object),
TEXT_PROP_MEANS_INVISIBLE (propval))))
prevline = find_next_newline_no_quit (prevline - 1, -1, &bytepos);
prevline = find_next_newline (prevline - 1, -1, &bytepos);
pos = *compute_motion (prevline, 0,
lmargin,
0,
......@@ -1894,7 +1894,7 @@ vmotion (register ptrdiff_t from, register EMACS_INT vtarget, struct window *w)
ptrdiff_t bytepos;
Lisp_Object propval;
prevline = find_next_newline_no_quit (from, -1, &bytepos);
prevline = find_next_newline (from, -1, &bytepos);
while (prevline > BEGV
&& ((selective > 0
&& indented_beyond_p (prevline, bytepos, selective))
......@@ -1904,7 +1904,7 @@ vmotion (register ptrdiff_t from, register EMACS_INT vtarget, struct window *w)
Qinvisible,
text_prop_object),
TEXT_PROP_MEANS_INVISIBLE (propval))))
prevline = find_next_newline_no_quit (prevline - 1, -1, &bytepos);
prevline = find_next_newline (prevline - 1, -1, &bytepos);
pos = *compute_motion (prevline, 0,
lmargin,
0,
......
......@@ -3346,8 +3346,7 @@ extern ptrdiff_t find_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t,
ptrdiff_t *, ptrdiff_t *, bool);
extern EMACS_INT scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
EMACS_INT, bool);
extern ptrdiff_t find_next_newline (ptrdiff_t, int);
extern ptrdiff_t find_next_newline_no_quit (ptrdiff_t, ptrdiff_t, ptrdiff_t *);
extern ptrdiff_t find_next_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t *);
extern ptrdiff_t find_before_next_newline (ptrdiff_t, ptrdiff_t,
ptrdiff_t, ptrdiff_t *);
extern void syms_of_search (void);
......
......@@ -942,7 +942,7 @@ scan_newline (ptrdiff_t start, ptrdiff_t start_byte,
}
ptrdiff_t
find_next_newline_no_quit (ptrdiff_t from, ptrdiff_t cnt, ptrdiff_t *bytepos)
find_next_newline (ptrdiff_t from, ptrdiff_t cnt, ptrdiff_t *bytepos)
{
return find_newline (from, 0, cnt, NULL, bytepos, 0);
}
......
......@@ -5906,8 +5906,7 @@ static void
back_to_previous_line_start (struct it *it)
{
IT_CHARPOS (*it)
= find_next_newline_no_quit (IT_CHARPOS (*it) - 1,
-1, &IT_BYTEPOS (*it));
= find_next_newline (IT_CHARPOS (*it) - 1, -1, &IT_BYTEPOS (*it));
}
 
 
......@@ -5979,7 +5978,7 @@ forward_to_next_line_start (struct it *it, int *skipped_p,
if (!newline_found_p)
{
ptrdiff_t bytepos, start = IT_CHARPOS (*it);
ptrdiff_t limit = find_next_newline_no_quit (start, 1, &bytepos);
ptrdiff_t limit = find_next_newline (start, 1, &bytepos);
Lisp_Object pos;
 
eassert (!STRINGP (it->string));
......@@ -7434,8 +7433,7 @@ get_visually_first_element (struct it *it)
it->bidi_it.charpos = it->bidi_it.bytepos = 0;
else
it->bidi_it.charpos
= find_next_newline_no_quit (IT_CHARPOS (*it), -1,
&it->bidi_it.bytepos);
= find_next_newline (IT_CHARPOS (*it), -1, &it->bidi_it.bytepos);
bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 1);
do
{
......@@ -9070,7 +9068,7 @@ move_it_vertically_backward (struct it *it, int dy)
&& FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n')
{
ptrdiff_t nl_pos =
find_next_newline_no_quit (IT_CHARPOS (*it) - 1, -1, NULL);
find_next_newline (IT_CHARPOS (*it) - 1, -1, NULL);
 
move_it_to (it, nl_pos, -1, -1, -1, MOVE_TO_POS);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment