/[emacs]/emacs/src/xdisp.c
ViewVC logotype

Diff of /emacs/src/xdisp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.932 by rms, Mon Nov 15 13:34:18 2004 UTC revision 1.933 by kfstorm, Mon Nov 15 15:21:34 2004 UTC
# Line 15818  store_mode_line_string (string, lisp_str Line 15818  store_mode_line_string (string, lisp_str
15818          props = mode_line_string_face_prop;          props = mode_line_string_face_prop;
15819        else if (!NILP (mode_line_string_face))        else if (!NILP (mode_line_string_face))
15820          {          {
15821            Lisp_Object face = Fplist_get (props, Qface);            Lisp_Object face = Fsafe_plist_get (props, Qface);
15822            props = Fcopy_sequence (props);            props = Fcopy_sequence (props);
15823            if (NILP (face))            if (NILP (face))
15824              face = mode_line_string_face;              face = mode_line_string_face;
# Line 15843  store_mode_line_string (string, lisp_str Line 15843  store_mode_line_string (string, lisp_str
15843            Lisp_Object face;            Lisp_Object face;
15844            if (NILP (props))            if (NILP (props))
15845              props = Ftext_properties_at (make_number (0), lisp_string);              props = Ftext_properties_at (make_number (0), lisp_string);
15846            face = Fplist_get (props, Qface);            face = Fsafe_plist_get (props, Qface);
15847            if (NILP (face))            if (NILP (face))
15848              face = mode_line_string_face;              face = mode_line_string_face;
15849            else            else
# Line 18624  produce_stretch_glyph (it) Line 18624  produce_stretch_glyph (it)
18624    plist = XCDR (it->object);    plist = XCDR (it->object);
18625    
18626    /* Compute the width of the stretch.  */    /* Compute the width of the stretch.  */
18627    if ((prop = Fplist_get (plist, QCwidth), !NILP (prop))    if ((prop = Fsafe_plist_get (plist, QCwidth), !NILP (prop))
18628        && calc_pixel_width_or_height (&tem, it, prop, font, 1, 0))        && calc_pixel_width_or_height (&tem, it, prop, font, 1, 0))
18629      {      {
18630        /* Absolute width `:width WIDTH' specified and valid.  */        /* Absolute width `:width WIDTH' specified and valid.  */
18631        zero_width_ok_p = 1;        zero_width_ok_p = 1;
18632        width = (int)tem;        width = (int)tem;
18633      }      }
18634    else if (prop = Fplist_get (plist, QCrelative_width),    else if (prop = Fsafe_plist_get (plist, QCrelative_width),
18635             NUMVAL (prop) > 0)             NUMVAL (prop) > 0)
18636      {      {
18637        /* Relative width `:relative-width FACTOR' specified and valid.        /* Relative width `:relative-width FACTOR' specified and valid.
# Line 18655  produce_stretch_glyph (it) Line 18655  produce_stretch_glyph (it)
18655        x_produce_glyphs (&it2);        x_produce_glyphs (&it2);
18656        width = NUMVAL (prop) * it2.pixel_width;        width = NUMVAL (prop) * it2.pixel_width;
18657      }      }
18658    else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop))    else if ((prop = Fsafe_plist_get (plist, QCalign_to), !NILP (prop))
18659             && calc_pixel_width_or_height (&tem, it, prop, font, 1, &align_to))             && calc_pixel_width_or_height (&tem, it, prop, font, 1, &align_to))
18660      {      {
18661        if (it->glyph_row == NULL || !it->glyph_row->mode_line_p)        if (it->glyph_row == NULL || !it->glyph_row->mode_line_p)
# Line 18675  produce_stretch_glyph (it) Line 18675  produce_stretch_glyph (it)
18675      width = 1;      width = 1;
18676    
18677    /* Compute height.  */    /* Compute height.  */
18678    if ((prop = Fplist_get (plist, QCheight), !NILP (prop))    if ((prop = Fsafe_plist_get (plist, QCheight), !NILP (prop))
18679        && calc_pixel_width_or_height (&tem, it, prop, font, 0, 0))        && calc_pixel_width_or_height (&tem, it, prop, font, 0, 0))
18680      {      {
18681        height = (int)tem;        height = (int)tem;
18682        zero_height_ok_p = 1;        zero_height_ok_p = 1;
18683      }      }
18684    else if (prop = Fplist_get (plist, QCrelative_height),    else if (prop = Fsafe_plist_get (plist, QCrelative_height),
18685             NUMVAL (prop) > 0)             NUMVAL (prop) > 0)
18686      height = FONT_HEIGHT (font) * NUMVAL (prop);      height = FONT_HEIGHT (font) * NUMVAL (prop);
18687    else    else
# Line 18693  produce_stretch_glyph (it) Line 18693  produce_stretch_glyph (it)
18693    /* Compute percentage of height used for ascent.  If    /* Compute percentage of height used for ascent.  If
18694       `:ascent ASCENT' is present and valid, use that.  Otherwise,       `:ascent ASCENT' is present and valid, use that.  Otherwise,
18695       derive the ascent from the font in use.  */       derive the ascent from the font in use.  */
18696    if (prop = Fplist_get (plist, QCascent),    if (prop = Fsafe_plist_get (plist, QCascent),
18697        NUMVAL (prop) > 0 && NUMVAL (prop) <= 100)        NUMVAL (prop) > 0 && NUMVAL (prop) <= 100)
18698      ascent = height * NUMVAL (prop) / 100.0;      ascent = height * NUMVAL (prop) / 100.0;
18699    else if (!NILP (prop)    else if (!NILP (prop)
# Line 20897  note_mode_line_or_margin_highlight (w, x Line 20897  note_mode_line_or_margin_highlight (w, x
20897    if (IMAGEP (object))    if (IMAGEP (object))
20898      {      {
20899        Lisp_Object image_map, hotspot;        Lisp_Object image_map, hotspot;
20900        if ((image_map = Fplist_get (XCDR (object), QCmap),        if ((image_map = Fsafe_plist_get (XCDR (object), QCmap),
20901             !NILP (image_map))             !NILP (image_map))
20902            && (hotspot = find_hot_spot (image_map, dx, dy),            && (hotspot = find_hot_spot (image_map, dx, dy),
20903                CONSP (hotspot))                CONSP (hotspot))
# Line 20909  note_mode_line_or_margin_highlight (w, x Line 20909  note_mode_line_or_margin_highlight (w, x
20909            /* Could check AREA_ID to see if we enter/leave this hot-spot.            /* Could check AREA_ID to see if we enter/leave this hot-spot.
20910               If so, we could look for mouse-enter, mouse-leave               If so, we could look for mouse-enter, mouse-leave
20911               properties in PLIST (and do something...).  */               properties in PLIST (and do something...).  */
20912            if ((plist = XCDR (hotspot), CONSP (plist)))            hotspot = XCDR (hotspot);
20913              if (CONSP (hotspot)
20914                  && (plist = XCAR (hotspot), CONSP (plist)))
20915              {              {
20916                pointer = Fplist_get (plist, Qpointer);                pointer = Fsafe_plist_get (plist, Qpointer);
20917                if (NILP (pointer))                if (NILP (pointer))
20918                  pointer = Qhand;                  pointer = Qhand;
20919                help = Fplist_get (plist, Qhelp_echo);                help = Fsafe_plist_get (plist, Qhelp_echo);
20920                if (!NILP (help))                if (!NILP (help))
20921                  {                  {
20922                    help_echo_string = help;                    help_echo_string = help;
# Line 20925  note_mode_line_or_margin_highlight (w, x Line 20927  note_mode_line_or_margin_highlight (w, x
20927                  }                  }
20928              }              }
20929            if (NILP (pointer))            if (NILP (pointer))
20930              pointer = Fplist_get (XCDR (object), QCpointer);              pointer = Fsafe_plist_get (XCDR (object), QCpointer);
20931          }          }
20932      }      }
20933    
# Line 21076  note_mouse_highlight (f, x, y) Line 21078  note_mouse_highlight (f, x, y)
21078            if (img != NULL && IMAGEP (img->spec))            if (img != NULL && IMAGEP (img->spec))
21079              {              {
21080                Lisp_Object image_map, hotspot;                Lisp_Object image_map, hotspot;
21081                if ((image_map = Fplist_get (XCDR (img->spec), QCmap),                if ((image_map = Fsafe_plist_get (XCDR (img->spec), QCmap),
21082                     !NILP (image_map))                     !NILP (image_map))
21083                    && (hotspot = find_hot_spot (image_map,                    && (hotspot = find_hot_spot (image_map,
21084                                                 glyph->slice.x + dx,                                                 glyph->slice.x + dx,
# Line 21090  note_mouse_highlight (f, x, y) Line 21092  note_mouse_highlight (f, x, y)
21092                    /* Could check AREA_ID to see if we enter/leave this hot-spot.                    /* Could check AREA_ID to see if we enter/leave this hot-spot.
21093                       If so, we could look for mouse-enter, mouse-leave                       If so, we could look for mouse-enter, mouse-leave
21094                       properties in PLIST (and do something...).  */                       properties in PLIST (and do something...).  */
21095                    if ((plist = XCDR (hotspot), CONSP (plist)))                    hotspot = XCDR (hotspot);
21096                      if (CONSP (hotspot)
21097                          && (plist = XCAR (hotspot), CONSP (plist)))
21098                      {                      {
21099                        pointer = Fplist_get (plist, Qpointer);                        pointer = Fsafe_plist_get (plist, Qpointer);
21100                        if (NILP (pointer))                        if (NILP (pointer))
21101                          pointer = Qhand;                          pointer = Qhand;
21102                        help_echo_string = Fplist_get (plist, Qhelp_echo);                        help_echo_string = Fsafe_plist_get (plist, Qhelp_echo);
21103                        if (!NILP (help_echo_string))                        if (!NILP (help_echo_string))
21104                          {                          {
21105                            help_echo_window = window;                            help_echo_window = window;
# Line 21105  note_mouse_highlight (f, x, y) Line 21109  note_mouse_highlight (f, x, y)
21109                      }                      }
21110                  }                  }
21111                if (NILP (pointer))                if (NILP (pointer))
21112                  pointer = Fplist_get (XCDR (img->spec), QCpointer);                  pointer = Fsafe_plist_get (XCDR (img->spec), QCpointer);
21113              }              }
21114          }          }
21115    

Legend:
Removed from v.1.932  
changed lines
  Added in v.1.933

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26