Commit 26b46e51 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Rename locals to match their nature.

 src/xdisp.c (mouse_face_from_buffer_pos, note_mouse_highlight): Rename
 cover_string to disp_string.
parent bc17a887
......@@ -3,6 +3,8 @@
* xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
Don't stop backward scan on the continuation glyph, even though
its CHARPOS is positive.
(mouse_face_from_buffer_pos, note_mouse_highlight): Rename
cover_string to disp_string.
2011-11-01 Martin Rudalics <rudalics@gmx.at>
......
......@@ -25808,7 +25808,7 @@ rows_from_pos_range (struct window *w,
for the overlay or run of text properties specifying the mouse
face. BEFORE_STRING and AFTER_STRING, if non-nil, are a
before-string and after-string that must also be highlighted.
COVER_STRING, if non-nil, is a display string that may cover some
DISP_STRING, if non-nil, is a display string that may cover some
or all of the highlighted text. */
static void
......@@ -25819,7 +25819,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
EMACS_INT end_charpos,
Lisp_Object before_string,
Lisp_Object after_string,
Lisp_Object cover_string)
Lisp_Object disp_string)
{
struct window *w = XWINDOW (window);
struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
......@@ -25828,7 +25828,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
EMACS_INT ignore, pos;
int x;
xassert (NILP (cover_string) || STRINGP (cover_string));
xassert (NILP (disp_string) || STRINGP (disp_string));
xassert (NILP (before_string) || STRINGP (before_string));
xassert (NILP (after_string) || STRINGP (after_string));
......@@ -25838,7 +25838,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
/* If the before-string or display-string contains newlines,
rows_from_pos_range skips to its last row. Move back. */
if (!NILP (before_string) || !NILP (cover_string))
if (!NILP (before_string) || !NILP (disp_string))
{
struct glyph_row *prev;
while ((prev = r1 - 1, prev >= first)
......@@ -25850,7 +25850,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
while (--glyph >= beg && INTEGERP (glyph->object));
if (glyph < beg
|| !(EQ (glyph->object, before_string)
|| EQ (glyph->object, cover_string)))
|| EQ (glyph->object, disp_string)))
break;
r1 = prev;
}
......@@ -25893,7 +25893,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix);
/* For a bidi-reordered row, the positions of BEFORE_STRING,
AFTER_STRING, COVER_STRING, START_CHARPOS, and END_CHARPOS
AFTER_STRING, DISP_STRING, START_CHARPOS, and END_CHARPOS
could be anywhere in the row and in any order. The strategy
below is to find the leftmost and the rightmost glyph that
belongs to either of these 3 strings, or whose position is
......@@ -25919,11 +25919,11 @@ mouse_face_from_buffer_pos (Lisp_Object window,
x += glyph->pixel_width;
/* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING,
or COVER_STRING, and the first glyph from buffer whose
or DISP_STRING, and the first glyph from buffer whose
position is between START_CHARPOS and END_CHARPOS. */
for (; glyph < end
&& !INTEGERP (glyph->object)
&& !EQ (glyph->object, cover_string)
&& !EQ (glyph->object, disp_string)
&& !(BUFFERP (glyph->object)
&& (glyph->charpos >= start_charpos
&& glyph->charpos < end_charpos));
......@@ -25970,11 +25970,11 @@ mouse_face_from_buffer_pos (Lisp_Object window,
;
/* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING,
or COVER_STRING, and the first glyph from buffer whose
or DISP_STRING, and the first glyph from buffer whose
position is between START_CHARPOS and END_CHARPOS. */
for (; glyph > end
&& !INTEGERP (glyph->object)
&& !EQ (glyph->object, cover_string)
&& !EQ (glyph->object, disp_string)
&& !(BUFFERP (glyph->object)
&& (glyph->charpos >= start_charpos
&& glyph->charpos < end_charpos));
......@@ -26034,12 +26034,12 @@ mouse_face_from_buffer_pos (Lisp_Object window,
--end;
/* Scan the rest of the glyph row from the end, looking for the
first glyph that comes from BEFORE_STRING, AFTER_STRING, or
COVER_STRING, or whose position is between START_CHARPOS
DISP_STRING, or whose position is between START_CHARPOS
and END_CHARPOS */
for (--end;
end > glyph
&& !INTEGERP (end->object)
&& !EQ (end->object, cover_string)
&& !EQ (end->object, disp_string)
&& !(BUFFERP (end->object)
&& (end->charpos >= start_charpos
&& end->charpos < end_charpos));
......@@ -26083,12 +26083,12 @@ mouse_face_from_buffer_pos (Lisp_Object window,
}
/* Scan the rest of the glyph row from the end, looking for the
first glyph that comes from BEFORE_STRING, AFTER_STRING, or
COVER_STRING, or whose position is between START_CHARPOS
DISP_STRING, or whose position is between START_CHARPOS
and END_CHARPOS */
for ( ;
end < glyph
&& !INTEGERP (end->object)
&& !EQ (end->object, cover_string)
&& !EQ (end->object, disp_string)
&& !(BUFFERP (end->object)
&& (end->charpos >= start_charpos
&& end->charpos < end_charpos));
......@@ -27083,7 +27083,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
/* The mouse-highlighting, if any, comes from an overlay
or text property in the buffer. */
Lisp_Object buffer IF_LINT (= Qnil);
Lisp_Object cover_string IF_LINT (= Qnil);
Lisp_Object disp_string IF_LINT (= Qnil);
if (STRINGP (object))
{
......@@ -27097,13 +27097,13 @@ note_mouse_highlight (struct frame *f, int x, int y)
mouse_face = get_char_property_and_overlay
(make_number (pos), Qmouse_face, w->buffer, &overlay);
buffer = w->buffer;
cover_string = object;
disp_string = object;
}
}
else
{
buffer = object;
cover_string = Qnil;
disp_string = Qnil;
}
if (!NILP (mouse_face))
......@@ -27155,7 +27155,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
XFASTINT (before),
XFASTINT (after),
before_string, after_string,
cover_string);
disp_string);
cursor = No_Cursor;
}
}
......
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