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; |
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 |
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. |
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) |
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 |
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) |
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)) |
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; |
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 |
|
|
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, |
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; |
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 |
|
|