[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111957: Rename find_next_newline to
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111957: Rename find_next_newline to find_newline_no_quit. |
Date: |
Wed, 06 Mar 2013 18:35:23 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111957
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Wed 2013-03-06 18:35:23 +0200
message:
Rename find_next_newline to find_newline_no_quit.
src/search.c (find_newline_no_quit): Rename from find_next_newline.
Add commentary.
src/lisp.h (find_newline_no_quit): Rename prototype.
src/xdisp.c (back_to_previous_line_start)
(forward_to_next_line_start, get_visually_first_element)
(move_it_vertically_backward): Callers of find_newline_no_quit changed.
src/indent.c (vmotion): Callers of find_newline_no_quit changed.
src/bidi.c (bidi_find_paragraph_start): Callers of
find_newline_no_quit changed.
modified:
src/ChangeLog
src/bidi.c
src/indent.c
src/lisp.h
src/search.c
src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-03-06 16:21:26 +0000
+++ b/src/ChangeLog 2013-03-06 16:35:23 +0000
@@ -1,5 +1,17 @@
2013-03-06 Eli Zaretskii <address@hidden>
+ * search.c (find_newline_no_quit): Rename from find_next_newline.
+ Add commentary.
+
+ * lisp.h (find_newline_no_quit): Rename prototype.
+
+ * xdisp.c (back_to_previous_line_start)
+ (forward_to_next_line_start, get_visually_first_element)
+ (move_it_vertically_backward): Callers of find_newline_no_quit changed.
+ * indent.c (vmotion): Callers of find_newline_no_quit changed.
+ * bidi.c (bidi_find_paragraph_start): Callers of
+ find_newline_no_quit changed.
+
* msdos.c: Change encoding to cp850. (Bug#13879)
(fr_keyboard, it_keyboard, dk_keyboard): Update keyboard layouts.
=== modified file 'src/bidi.c'
--- a/src/bidi.c 2013-03-05 23:08:11 +0000
+++ b/src/bidi.c 2013-03-06 16:35:23 +0000
@@ -1108,7 +1108,7 @@
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 (pos - 1, -1, &pos_byte);
+ pos = find_newline_no_quit (pos - 1, -1, &pos_byte);
if (n >= MAX_PARAGRAPH_SEARCH)
pos_byte = BEGV_BYTE;
return pos_byte;
=== modified file 'src/indent.c'
--- a/src/indent.c 2013-03-05 23:08:11 +0000
+++ b/src/indent.c 2013-03-06 16:35:23 +0000
@@ -1843,7 +1843,7 @@
ptrdiff_t bytepos;
Lisp_Object propval;
- prevline = find_next_newline (from - 1, -1, &bytepos);
+ prevline = find_newline_no_quit (from - 1, -1, &bytepos);
while (prevline > BEGV
&& ((selective > 0
&& indented_beyond_p (prevline, bytepos, selective))
@@ -1853,7 +1853,7 @@
Qinvisible,
text_prop_object),
TEXT_PROP_MEANS_INVISIBLE (propval))))
- prevline = find_next_newline (prevline - 1, -1, &bytepos);
+ prevline = find_newline_no_quit (prevline - 1, -1, &bytepos);
pos = *compute_motion (prevline, 0,
lmargin,
0,
@@ -1894,7 +1894,7 @@
ptrdiff_t bytepos;
Lisp_Object propval;
- prevline = find_next_newline (from, -1, &bytepos);
+ prevline = find_newline_no_quit (from, -1, &bytepos);
while (prevline > BEGV
&& ((selective > 0
&& indented_beyond_p (prevline, bytepos, selective))
@@ -1904,7 +1904,7 @@
Qinvisible,
text_prop_object),
TEXT_PROP_MEANS_INVISIBLE (propval))))
- prevline = find_next_newline (prevline - 1, -1, &bytepos);
+ prevline = find_newline_no_quit (prevline - 1, -1, &bytepos);
pos = *compute_motion (prevline, 0,
lmargin,
0,
=== modified file 'src/lisp.h'
--- a/src/lisp.h 2013-03-05 23:08:11 +0000
+++ b/src/lisp.h 2013-03-06 16:35:23 +0000
@@ -3346,7 +3346,7 @@
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, ptrdiff_t, ptrdiff_t *);
+extern ptrdiff_t find_newline_no_quit (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);
=== modified file 'src/search.c'
--- a/src/search.c 2013-03-05 23:08:11 +0000
+++ b/src/search.c 2013-03-06 16:35:23 +0000
@@ -941,15 +941,17 @@
return count * direction;
}
+/* Like find_newline, but doesn't allow QUITting and doesn't return
+ SHORTAGE. */
ptrdiff_t
-find_next_newline (ptrdiff_t from, ptrdiff_t cnt, ptrdiff_t *bytepos)
+find_newline_no_quit (ptrdiff_t from, ptrdiff_t cnt, ptrdiff_t *bytepos)
{
return find_newline (from, 0, cnt, NULL, bytepos, 0);
}
-/* Like find_next_newline, but returns position before the newline,
- not after, and only search up to TO. This isn't just
- find_next_newline (...)-1, because you might hit TO. */
+/* Like find_newline, but returns position before the newline, not
+ after, and only search up to TO.
+ This isn't just find_newline_no_quit (...)-1, because you might hit TO. */
ptrdiff_t
find_before_next_newline (ptrdiff_t from, ptrdiff_t to,
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2013-03-05 23:08:11 +0000
+++ b/src/xdisp.c 2013-03-06 16:35:23 +0000
@@ -5905,8 +5905,8 @@
static void
back_to_previous_line_start (struct it *it)
{
- IT_CHARPOS (*it)
- = find_next_newline (IT_CHARPOS (*it) - 1, -1, &IT_BYTEPOS (*it));
+ IT_CHARPOS (*it) = find_newline_no_quit (IT_CHARPOS (*it) - 1, -1,
+ &IT_BYTEPOS (*it));
}
@@ -5922,7 +5922,7 @@
Newlines may come from buffer text, overlay strings, or strings
displayed via the `display' property. That's the reason we can't
- simply use find_next_newline_no_quit.
+ simply use find_newline_no_quit.
Note that this function may not skip over invisible text that is so
because of text properties and immediately follows a newline. If
@@ -5978,7 +5978,7 @@
if (!newline_found_p)
{
ptrdiff_t bytepos, start = IT_CHARPOS (*it);
- ptrdiff_t limit = find_next_newline (start, 1, &bytepos);
+ ptrdiff_t limit = find_newline_no_quit (start, 1, &bytepos);
Lisp_Object pos;
eassert (!STRINGP (it->string));
@@ -7432,8 +7432,8 @@
if (string_p)
it->bidi_it.charpos = it->bidi_it.bytepos = 0;
else
- it->bidi_it.charpos
- = find_next_newline (IT_CHARPOS (*it), -1, &it->bidi_it.bytepos);
+ it->bidi_it.charpos = find_newline_no_quit (IT_CHARPOS (*it), -1,
+ &it->bidi_it.bytepos);
bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 1);
do
{
@@ -9067,8 +9067,8 @@
&& IT_CHARPOS (*it) > BEGV
&& FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n')
{
- ptrdiff_t nl_pos =
- find_next_newline (IT_CHARPOS (*it) - 1, -1, NULL);
+ ptrdiff_t nl_pos = find_newline_no_quit (IT_CHARPOS (*it) - 1, -1,
+ NULL);
move_it_to (it, nl_pos, -1, -1, -1, MOVE_TO_POS);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111957: Rename find_next_newline to find_newline_no_quit.,
Eli Zaretskii <=