]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_produce_glyphs): Fix the proverbial int/Lisp_Object mixup.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 27 Apr 2004 22:00:03 +0000 (22:00 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 27 Apr 2004 22:00:03 +0000 (22:00 +0000)
(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'.

src/xdisp.c

index 2ef3722c080727db30c053f6df049c9376e3181a..54efa19c5cc7c0233005461c7da06f0342843e8c 100644 (file)
@@ -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,