|| EQ (XCAR (spec), Qright_fringe))
&& CONSP (XCDR (spec)))
{
- int fringe_bitmap;
-
if (it)
{
if (!FRAME_WINDOW_P (it->f))
return 1;
#ifdef HAVE_WINDOW_SYSTEM
+ int fringe_bitmap;
+
value = XCAR (XCDR (spec));
if (!SYMBOLP (value)
|| !(fringe_bitmap = lookup_fringe_bitmap (value)))
void *ppos_data = NULL;
bool may_wrap = false;
enum it_method prev_method = it->method;
- ptrdiff_t closest_pos IF_LINT (= 0), prev_pos = IT_CHARPOS (*it);
+ ptrdiff_t closest_pos UNINIT;
+ ptrdiff_t prev_pos = IT_CHARPOS (*it);
bool saw_smaller_pos = prev_pos < to_charpos;
/* Don't produce glyphs in produce_glyphs. */
}
else
result = MOVE_NEWLINE_OR_CR;
+ /* If we've processed the newline, make sure this flag is
+ reset, as it must only be set when the newline itself is
+ processed. */
+ if (result == MOVE_NEWLINE_OR_CR)
+ it->constrain_row_ascent_descent_p = false;
break;
}
struct text_pos saved_pos;
Lisp_Object saved_object;
struct face *face;
- struct glyph *g;
saved_object = it->object;
saved_pos = it->position;
/* Make sure this space glyph has the right ascent and
descent values, or else cursor at end of line will look
funny, and height of empty lines will be incorrect. */
- g = it->glyph_row->glyphs[TEXT_AREA] + n;
+ struct glyph *g = it->glyph_row->glyphs[TEXT_AREA] + n;
struct font *font = face->font ? face->font : FRAME_FONT (it->f);
if (n == 0)
{
struct it wrap_it;
void *wrap_data = NULL;
bool may_wrap = false;
- int wrap_x IF_LINT (= 0);
+ int wrap_x UNINIT;
int wrap_row_used = -1;
- int wrap_row_ascent IF_LINT (= 0), wrap_row_height IF_LINT (= 0);
- int wrap_row_phys_ascent IF_LINT (= 0), wrap_row_phys_height IF_LINT (= 0);
- int wrap_row_extra_line_spacing IF_LINT (= 0);
- ptrdiff_t wrap_row_min_pos IF_LINT (= 0), wrap_row_min_bpos IF_LINT (= 0);
- ptrdiff_t wrap_row_max_pos IF_LINT (= 0), wrap_row_max_bpos IF_LINT (= 0);
+ int wrap_row_ascent UNINIT, wrap_row_height UNINIT;
+ int wrap_row_phys_ascent UNINIT, wrap_row_phys_height UNINIT;
+ int wrap_row_extra_line_spacing UNINIT;
+ ptrdiff_t wrap_row_min_pos UNINIT, wrap_row_min_bpos UNINIT;
+ ptrdiff_t wrap_row_max_pos UNINIT, wrap_row_max_bpos UNINIT;
int cvpos;
ptrdiff_t min_pos = ZV + 1, max_pos = 0;
- ptrdiff_t min_bpos IF_LINT (= 0), max_bpos IF_LINT (= 0);
+ ptrdiff_t min_bpos UNINIT, max_bpos UNINIT;
bool pending_handle_line_prefix = false;
/* We always start displaying at hpos zero even if hscrolled. */
int pt_x, target_x, pixel_width, pt_vpos;
bool at_eol_p;
bool overshoot_expected = false;
+#ifdef HAVE_WINDOW_SYSTEM
bool target_is_eol_p = false;
+#endif
/* Setup the arena. */
SET_TEXT_POS (pt, PT, PT_BYTE);
{
move_it_by_lines (&it, -1);
target_x = it.last_visible_x - !FRAME_WINDOW_P (it.f);
+#ifdef HAVE_WINDOW_SYSTEM
target_is_eol_p = true;
+#endif
/* Under word-wrap, we don't know the x coordinate of
the last character displayed on the previous line,
which immediately precedes the wrap point. To find
{
struct glyph_string *h, *t;
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
- int mouse_beg_col IF_LINT (= 0), mouse_end_col IF_LINT (= 0);
+ int mouse_beg_col UNINIT, mouse_end_col UNINIT;
bool check_mouse_face = false;
int dummy_x = 0;
show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw)
{
struct window *w = XWINDOW (hlinfo->mouse_face_window);
+#ifdef HAVE_WINDOW_SYSTEM
struct frame *f = XFRAME (WINDOW_FRAME (w));
+#else
+ (void) XFRAME (WINDOW_FRAME (w));
+#endif
if (/* If window is in the process of being destroyed, don't bother
to do anything. */
anymore. This can happen when a window is split. */
&& hlinfo->mouse_face_end_row < w->current_matrix->nrows)
{
+#ifdef HAVE_WINDOW_SYSTEM
bool phys_cursor_on_p = w->phys_cursor_on_p;
+#endif
struct glyph_row *row, *first, *last;
first = MATRIX_ROW (w->current_matrix, hlinfo->mouse_face_beg_row);
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
#ifdef HAVE_WINDOW_SYSTEM
Display_Info *dpyinfo;
-#endif
Cursor cursor = No_Cursor;
Lisp_Object pointer = Qnil;
+#endif
int dx, dy, width, height;
ptrdiff_t charpos;
Lisp_Object string, object = Qnil;
- Lisp_Object pos IF_LINT (= Qnil), help;
-
+ Lisp_Object pos UNINIT;
Lisp_Object mouse_face;
int original_x_pixel = x;
struct glyph * glyph = NULL, * row_start_glyph = NULL;
- struct glyph_row *row IF_LINT (= 0);
+ struct glyph_row *row UNINIT;
if (area == ON_MODE_LINE || area == ON_HEADER_LINE)
{
&object, &dx, &dy, &width, &height);
}
- help = Qnil;
+ Lisp_Object help = Qnil;
#ifdef HAVE_WINDOW_SYSTEM
if (IMAGEP (object))
&& hlinfo->mouse_face_beg_row == vpos )
return;
+#ifdef HAVE_WINDOW_SYSTEM
if (clear_mouse_face (hlinfo))
cursor = No_Cursor;
+#else
+ (void) clear_mouse_face (hlinfo);
+#endif
if (!row->reversed_p)
{
show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
mouse_face_shown = true;
+#ifdef HAVE_WINDOW_SYSTEM
if (NILP (pointer))
pointer = Qhand;
+#endif
}
}
enum window_part part = ON_NOTHING;
Lisp_Object window;
struct window *w;
+#ifdef HAVE_WINDOW_SYSTEM
Cursor cursor = No_Cursor;
Lisp_Object pointer = Qnil; /* Takes precedence over cursor! */
+#endif
struct buffer *b;
/* When a menu is active, don't highlight because this looks odd. */
&& glyph->type == STRETCH_GLYPH
&& glyph->avoid_cursor_p))
{
+#ifndef HAVE_WINDOW_SYSTEM
+ (void) clear_mouse_face (hlinfo);
+#else /* HAVE_WINDOW_SYSTEM */
if (clear_mouse_face (hlinfo))
cursor = No_Cursor;
-#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f) && NILP (pointer))
{
if (area != TEXT_AREA)
else
pointer = Vvoid_text_area_pointer;
}
-#endif
+#endif /* HAVE_WINDOW_SYSTEM */
goto set_cursor;
}
same_region = coords_in_mouse_face_p (w, hpos, vpos);
+#ifdef HAVE_WINDOW_SYSTEM
if (same_region)
cursor = No_Cursor;
+#endif
/* Check mouse-face highlighting. */
if (! same_region
hlinfo->mouse_face_overlay = overlay;
/* Clear the display of the old active region, if any. */
+#ifdef HAVE_WINDOW_SYSTEM
if (clear_mouse_face (hlinfo))
cursor = No_Cursor;
+#else
+ (void) clear_mouse_face (hlinfo);
+#endif
/* If no overlay applies, get a text property. */
if (NILP (overlay))
= face_at_string_position (w, object, pos, 0, &ignore,
glyph->face_id, true);
show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
+#ifdef HAVE_WINDOW_SYSTEM
cursor = No_Cursor;
+#endif
}
else
{
/* The mouse-highlighting, if any, comes from an overlay
or text property in the buffer. */
- Lisp_Object buffer IF_LINT (= Qnil);
- Lisp_Object disp_string IF_LINT (= Qnil);
+ Lisp_Object buffer UNINIT;
+ Lisp_Object disp_string UNINIT;
if (STRINGP (object))
{
: XFASTINT (after),
before_string, after_string,
disp_string);
+#ifdef HAVE_WINDOW_SYSTEM
cursor = No_Cursor;
+#endif
}
}
}