comparison src/xdisp.c @ 83292:ad07ff6e4555

Merged from miles@gnu.org--gnu-2005 (patch 67, 270-278) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-270 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-271 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-272 src/xdisp.c (dump_glyph_row): Don't display overlay_arrow_p field. * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-273 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-274 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-275 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-276 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-277 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-278 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-67 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-332
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 25 Apr 2005 11:49:38 +0000
parents bbf359ec4a59 f0d1759ab128
children a8c8fab4072c
comparison
equal deleted inserted replaced
83291:bbf359ec4a59 83292:ad07ff6e4555
14154 struct glyph_row *row; 14154 struct glyph_row *row;
14155 int vpos, glyphs; 14155 int vpos, glyphs;
14156 { 14156 {
14157 if (glyphs != 1) 14157 if (glyphs != 1)
14158 { 14158 {
14159 fprintf (stderr, "Row Start End Used oEI><O\\CTZFesm X Y W H V A P\n"); 14159 fprintf (stderr, "Row Start End Used oEI><\\CTZFesm X Y W H V A P\n");
14160 fprintf (stderr, "=======================================================================\n"); 14160 fprintf (stderr, "======================================================================\n");
14161 14161
14162 fprintf (stderr, "%3d %5d %5d %4d %1.1d%1.1d%1.1d%1.1d%1.1d\ 14162 fprintf (stderr, "%3d %5d %5d %4d %1.1d%1.1d%1.1d%1.1d\
14163 %1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d %4d %4d %4d %4d %4d %4d %4d\n", 14163 %1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d %4d %4d %4d %4d %4d %4d %4d\n",
14164 vpos, 14164 vpos,
14165 MATRIX_ROW_START_CHARPOS (row), 14165 MATRIX_ROW_START_CHARPOS (row),
14166 MATRIX_ROW_END_CHARPOS (row), 14166 MATRIX_ROW_END_CHARPOS (row),
14167 row->used[TEXT_AREA], 14167 row->used[TEXT_AREA],
14168 row->contains_overlapping_glyphs_p, 14168 row->contains_overlapping_glyphs_p,
14169 row->enabled_p, 14169 row->enabled_p,
14170 row->truncated_on_left_p, 14170 row->truncated_on_left_p,
14171 row->truncated_on_right_p, 14171 row->truncated_on_right_p,
14172 row->overlay_arrow_p,
14173 row->continued_p, 14172 row->continued_p,
14174 MATRIX_ROW_CONTINUATION_LINE_P (row), 14173 MATRIX_ROW_CONTINUATION_LINE_P (row),
14175 row->displays_text_p, 14174 row->displays_text_p,
14176 row->ends_at_zv_p, 14175 row->ends_at_zv_p,
14177 row->fill_line_p, 14176 row->fill_line_p,
16087 lisp_string = make_string (string, len); 16086 lisp_string = make_string (string, len);
16088 if (NILP (props)) 16087 if (NILP (props))
16089 props = mode_line_string_face_prop; 16088 props = mode_line_string_face_prop;
16090 else if (!NILP (mode_line_string_face)) 16089 else if (!NILP (mode_line_string_face))
16091 { 16090 {
16092 Lisp_Object face = Fsafe_plist_get (props, Qface); 16091 Lisp_Object face = Fplist_get (props, Qface);
16093 props = Fcopy_sequence (props); 16092 props = Fcopy_sequence (props);
16094 if (NILP (face)) 16093 if (NILP (face))
16095 face = mode_line_string_face; 16094 face = mode_line_string_face;
16096 else 16095 else
16097 face = Fcons (face, Fcons (mode_line_string_face, Qnil)); 16096 face = Fcons (face, Fcons (mode_line_string_face, Qnil));
16112 if (!NILP (mode_line_string_face)) 16111 if (!NILP (mode_line_string_face))
16113 { 16112 {
16114 Lisp_Object face; 16113 Lisp_Object face;
16115 if (NILP (props)) 16114 if (NILP (props))
16116 props = Ftext_properties_at (make_number (0), lisp_string); 16115 props = Ftext_properties_at (make_number (0), lisp_string);
16117 face = Fsafe_plist_get (props, Qface); 16116 face = Fplist_get (props, Qface);
16118 if (NILP (face)) 16117 if (NILP (face))
16119 face = mode_line_string_face; 16118 face = mode_line_string_face;
16120 else 16119 else
16121 face = Fcons (face, Fcons (mode_line_string_face, Qnil)); 16120 face = Fcons (face, Fcons (mode_line_string_face, Qnil));
16122 props = Fcons (Qface, Fcons (face, Qnil)); 16121 props = Fcons (Qface, Fcons (face, Qnil));
18915 /* List should start with `space'. */ 18914 /* List should start with `space'. */
18916 xassert (CONSP (it->object) && EQ (XCAR (it->object), Qspace)); 18915 xassert (CONSP (it->object) && EQ (XCAR (it->object), Qspace));
18917 plist = XCDR (it->object); 18916 plist = XCDR (it->object);
18918 18917
18919 /* Compute the width of the stretch. */ 18918 /* Compute the width of the stretch. */
18920 if ((prop = Fsafe_plist_get (plist, QCwidth), !NILP (prop)) 18919 if ((prop = Fplist_get (plist, QCwidth), !NILP (prop))
18921 && calc_pixel_width_or_height (&tem, it, prop, font, 1, 0)) 18920 && calc_pixel_width_or_height (&tem, it, prop, font, 1, 0))
18922 { 18921 {
18923 /* Absolute width `:width WIDTH' specified and valid. */ 18922 /* Absolute width `:width WIDTH' specified and valid. */
18924 zero_width_ok_p = 1; 18923 zero_width_ok_p = 1;
18925 width = (int)tem; 18924 width = (int)tem;
18926 } 18925 }
18927 else if (prop = Fsafe_plist_get (plist, QCrelative_width), 18926 else if (prop = Fplist_get (plist, QCrelative_width),
18928 NUMVAL (prop) > 0) 18927 NUMVAL (prop) > 0)
18929 { 18928 {
18930 /* Relative width `:relative-width FACTOR' specified and valid. 18929 /* Relative width `:relative-width FACTOR' specified and valid.
18931 Compute the width of the characters having the `glyph' 18930 Compute the width of the characters having the `glyph'
18932 property. */ 18931 property. */
18946 it2.glyph_row = NULL; 18945 it2.glyph_row = NULL;
18947 it2.what = IT_CHARACTER; 18946 it2.what = IT_CHARACTER;
18948 x_produce_glyphs (&it2); 18947 x_produce_glyphs (&it2);
18949 width = NUMVAL (prop) * it2.pixel_width; 18948 width = NUMVAL (prop) * it2.pixel_width;
18950 } 18949 }
18951 else if ((prop = Fsafe_plist_get (plist, QCalign_to), !NILP (prop)) 18950 else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop))
18952 && calc_pixel_width_or_height (&tem, it, prop, font, 1, &align_to)) 18951 && calc_pixel_width_or_height (&tem, it, prop, font, 1, &align_to))
18953 { 18952 {
18954 if (it->glyph_row == NULL || !it->glyph_row->mode_line_p) 18953 if (it->glyph_row == NULL || !it->glyph_row->mode_line_p)
18955 align_to = (align_to < 0 18954 align_to = (align_to < 0
18956 ? 0 18955 ? 0
18966 18965
18967 if (width <= 0 && (width < 0 || !zero_width_ok_p)) 18966 if (width <= 0 && (width < 0 || !zero_width_ok_p))
18968 width = 1; 18967 width = 1;
18969 18968
18970 /* Compute height. */ 18969 /* Compute height. */
18971 if ((prop = Fsafe_plist_get (plist, QCheight), !NILP (prop)) 18970 if ((prop = Fplist_get (plist, QCheight), !NILP (prop))
18972 && calc_pixel_width_or_height (&tem, it, prop, font, 0, 0)) 18971 && calc_pixel_width_or_height (&tem, it, prop, font, 0, 0))
18973 { 18972 {
18974 height = (int)tem; 18973 height = (int)tem;
18975 zero_height_ok_p = 1; 18974 zero_height_ok_p = 1;
18976 } 18975 }
18977 else if (prop = Fsafe_plist_get (plist, QCrelative_height), 18976 else if (prop = Fplist_get (plist, QCrelative_height),
18978 NUMVAL (prop) > 0) 18977 NUMVAL (prop) > 0)
18979 height = FONT_HEIGHT (font) * NUMVAL (prop); 18978 height = FONT_HEIGHT (font) * NUMVAL (prop);
18980 else 18979 else
18981 height = FONT_HEIGHT (font); 18980 height = FONT_HEIGHT (font);
18982 18981
18984 height = 1; 18983 height = 1;
18985 18984
18986 /* Compute percentage of height used for ascent. If 18985 /* Compute percentage of height used for ascent. If
18987 `:ascent ASCENT' is present and valid, use that. Otherwise, 18986 `:ascent ASCENT' is present and valid, use that. Otherwise,
18988 derive the ascent from the font in use. */ 18987 derive the ascent from the font in use. */
18989 if (prop = Fsafe_plist_get (plist, QCascent), 18988 if (prop = Fplist_get (plist, QCascent),
18990 NUMVAL (prop) > 0 && NUMVAL (prop) <= 100) 18989 NUMVAL (prop) > 0 && NUMVAL (prop) <= 100)
18991 ascent = height * NUMVAL (prop) / 100.0; 18990 ascent = height * NUMVAL (prop) / 100.0;
18992 else if (!NILP (prop) 18991 else if (!NILP (prop)
18993 && calc_pixel_width_or_height (&tem, it, prop, font, 0, 0)) 18992 && calc_pixel_width_or_height (&tem, it, prop, font, 0, 0))
18994 ascent = min (max (0, (int)tem), height); 18993 ascent = min (max (0, (int)tem), height);
21241 help = Qnil; 21240 help = Qnil;
21242 21241
21243 if (IMAGEP (object)) 21242 if (IMAGEP (object))
21244 { 21243 {
21245 Lisp_Object image_map, hotspot; 21244 Lisp_Object image_map, hotspot;
21246 if ((image_map = Fsafe_plist_get (XCDR (object), QCmap), 21245 if ((image_map = Fplist_get (XCDR (object), QCmap),
21247 !NILP (image_map)) 21246 !NILP (image_map))
21248 && (hotspot = find_hot_spot (image_map, dx, dy), 21247 && (hotspot = find_hot_spot (image_map, dx, dy),
21249 CONSP (hotspot)) 21248 CONSP (hotspot))
21250 && (hotspot = XCDR (hotspot), CONSP (hotspot))) 21249 && (hotspot = XCDR (hotspot), CONSP (hotspot)))
21251 { 21250 {
21257 properties in PLIST (and do something...). */ 21256 properties in PLIST (and do something...). */
21258 hotspot = XCDR (hotspot); 21257 hotspot = XCDR (hotspot);
21259 if (CONSP (hotspot) 21258 if (CONSP (hotspot)
21260 && (plist = XCAR (hotspot), CONSP (plist))) 21259 && (plist = XCAR (hotspot), CONSP (plist)))
21261 { 21260 {
21262 pointer = Fsafe_plist_get (plist, Qpointer); 21261 pointer = Fplist_get (plist, Qpointer);
21263 if (NILP (pointer)) 21262 if (NILP (pointer))
21264 pointer = Qhand; 21263 pointer = Qhand;
21265 help = Fsafe_plist_get (plist, Qhelp_echo); 21264 help = Fplist_get (plist, Qhelp_echo);
21266 if (!NILP (help)) 21265 if (!NILP (help))
21267 { 21266 {
21268 help_echo_string = help; 21267 help_echo_string = help;
21269 /* Is this correct? ++kfs */ 21268 /* Is this correct? ++kfs */
21270 XSETWINDOW (help_echo_window, w); 21269 XSETWINDOW (help_echo_window, w);
21272 help_echo_pos = charpos; 21271 help_echo_pos = charpos;
21273 } 21272 }
21274 } 21273 }
21275 } 21274 }
21276 if (NILP (pointer)) 21275 if (NILP (pointer))
21277 pointer = Fsafe_plist_get (XCDR (object), QCpointer); 21276 pointer = Fplist_get (XCDR (object), QCpointer);
21278 } 21277 }
21279 21278
21280 if (STRINGP (string)) 21279 if (STRINGP (string))
21281 { 21280 {
21282 pos = make_number (charpos); 21281 pos = make_number (charpos);
21425 { 21424 {
21426 struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id); 21425 struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id);
21427 if (img != NULL && IMAGEP (img->spec)) 21426 if (img != NULL && IMAGEP (img->spec))
21428 { 21427 {
21429 Lisp_Object image_map, hotspot; 21428 Lisp_Object image_map, hotspot;
21430 if ((image_map = Fsafe_plist_get (XCDR (img->spec), QCmap), 21429 if ((image_map = Fplist_get (XCDR (img->spec), QCmap),
21431 !NILP (image_map)) 21430 !NILP (image_map))
21432 && (hotspot = find_hot_spot (image_map, 21431 && (hotspot = find_hot_spot (image_map,
21433 glyph->slice.x + dx, 21432 glyph->slice.x + dx,
21434 glyph->slice.y + dy), 21433 glyph->slice.y + dy),
21435 CONSP (hotspot)) 21434 CONSP (hotspot))
21443 properties in PLIST (and do something...). */ 21442 properties in PLIST (and do something...). */
21444 hotspot = XCDR (hotspot); 21443 hotspot = XCDR (hotspot);
21445 if (CONSP (hotspot) 21444 if (CONSP (hotspot)
21446 && (plist = XCAR (hotspot), CONSP (plist))) 21445 && (plist = XCAR (hotspot), CONSP (plist)))
21447 { 21446 {
21448 pointer = Fsafe_plist_get (plist, Qpointer); 21447 pointer = Fplist_get (plist, Qpointer);
21449 if (NILP (pointer)) 21448 if (NILP (pointer))
21450 pointer = Qhand; 21449 pointer = Qhand;
21451 help_echo_string = Fsafe_plist_get (plist, Qhelp_echo); 21450 help_echo_string = Fplist_get (plist, Qhelp_echo);
21452 if (!NILP (help_echo_string)) 21451 if (!NILP (help_echo_string))
21453 { 21452 {
21454 help_echo_window = window; 21453 help_echo_window = window;
21455 help_echo_object = glyph->object; 21454 help_echo_object = glyph->object;
21456 help_echo_pos = glyph->charpos; 21455 help_echo_pos = glyph->charpos;
21457 } 21456 }
21458 } 21457 }
21459 } 21458 }
21460 if (NILP (pointer)) 21459 if (NILP (pointer))
21461 pointer = Fsafe_plist_get (XCDR (img->spec), QCpointer); 21460 pointer = Fplist_get (XCDR (img->spec), QCpointer);
21462 } 21461 }
21463 } 21462 }
21464 21463
21465 /* Clear mouse face if X/Y not over text. */ 21464 /* Clear mouse face if X/Y not over text. */
21466 if (glyph == NULL 21465 if (glyph == NULL