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