From: Stefan Monnier Date: Tue, 27 Apr 2004 22:00:03 +0000 (+0000) Subject: (x_produce_glyphs): Fix the proverbial int/Lisp_Object mixup. X-Git-Tag: ttn-vms-21-2-B4~6546 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b1c2132c0c2bc822792bce336407f66e5fab5501;p=emacs.git (x_produce_glyphs): Fix the proverbial int/Lisp_Object mixup. (on_hot_spot_p): Make sure we always return a value. (Flookup_image_map): Remove unused var ix and iy. (note_mode_line_or_margin_highlight): Remove unused var `image'. --- diff --git a/src/xdisp.c b/src/xdisp.c index 2ef3722c080..54efa19c5cc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18708,7 +18708,8 @@ x_produce_glyphs (it) it->pixel_width = 0; it->nglyphs = 0; - lh = Fget_text_property (IT_CHARPOS (*it), Qline_height, it->object); + lh = Fget_text_property (make_number (IT_CHARPOS (*it)), + Qline_height, it->object); if (EQ (lh, Qt)) { @@ -18754,17 +18755,20 @@ x_produce_glyphs (it) if (INTEGERP (lh)) explicit_height = XINT (lh); else if (FLOATP (lh)) - explicit_height = (it->phys_ascent + it->phys_descent) * XFLOAT_DATA (lh); + explicit_height = (it->phys_ascent + it->phys_descent) + * XFLOAT_DATA (lh); if (explicit_height > it->ascent + it->descent) it->ascent = explicit_height - it->descent; } - lsp = Fget_text_property (IT_CHARPOS (*it), Qline_spacing, it->object); + lsp = Fget_text_property (make_number (IT_CHARPOS (*it)), + Qline_spacing, it->object); if (INTEGERP (lsp)) extra_line_spacing = XINT (lsp); else if (FLOATP (lsp)) - extra_line_spacing = (it->phys_ascent + it->phys_descent) * XFLOAT_DATA (lsp); + extra_line_spacing = (it->phys_ascent + it->phys_descent) + * XFLOAT_DATA (lsp); } else if (it->char_to_display == '\t') { @@ -20437,8 +20441,8 @@ on_hot_spot_p (hot_spot, x, y) return inside; } } - else - return 0; + /* If we don't understand the format, pretend we're not in the hot-spot. */ + return 0; } Lisp_Object @@ -20473,7 +20477,6 @@ Returns the alist element for the first matching AREA in MAP. */) Lisp_Object map; Lisp_Object x, y; { - int ix, iy; if (NILP (map)) return Qnil; @@ -20539,7 +20542,7 @@ note_mode_line_or_margin_highlight (w, x, y, area) Lisp_Object pointer = Qnil; int charpos, dx, dy, width, height; Lisp_Object string, object = Qnil; - Lisp_Object pos, help, image; + Lisp_Object pos, help; if (area == ON_MODE_LINE || area == ON_HEADER_LINE) string = mode_line_string (w, area, &x, &y, &charpos,