diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 198 |
1 files changed, 108 insertions, 90 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 60354b9d8d6..3e5dc207c36 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2859,6 +2859,10 @@ handle_single_display_prop (it, prop, object, position) | |||
| 2859 | it->method = next_element_from_string; | 2859 | it->method = next_element_from_string; |
| 2860 | it->stop_charpos = 0; | 2860 | it->stop_charpos = 0; |
| 2861 | it->string_from_display_prop_p = 1; | 2861 | it->string_from_display_prop_p = 1; |
| 2862 | /* Say that we haven't consumed the characters with | ||
| 2863 | `display' property yet. The call to pop_it in | ||
| 2864 | set_iterator_to_next will clean this up. */ | ||
| 2865 | *position = start_pos; | ||
| 2862 | } | 2866 | } |
| 2863 | else if (CONSP (value) && EQ (XCAR (value), Qspace)) | 2867 | else if (CONSP (value) && EQ (XCAR (value), Qspace)) |
| 2864 | { | 2868 | { |
| @@ -11374,6 +11378,7 @@ try_window_id (w) | |||
| 11374 | 11378 | ||
| 11375 | void dump_glyph_row P_ ((struct glyph_matrix *, int, int)); | 11379 | void dump_glyph_row P_ ((struct glyph_matrix *, int, int)); |
| 11376 | void dump_glyph_matrix P_ ((struct glyph_matrix *, int)); | 11380 | void dump_glyph_matrix P_ ((struct glyph_matrix *, int)); |
| 11381 | void dump_glyph P_ ((struct glyph_row *, struct glyph *, int)); | ||
| 11377 | 11382 | ||
| 11378 | 11383 | ||
| 11379 | /* Dump the contents of glyph matrix MATRIX on stderr. | 11384 | /* Dump the contents of glyph matrix MATRIX on stderr. |
| @@ -11393,6 +11398,77 @@ dump_glyph_matrix (matrix, glyphs) | |||
| 11393 | } | 11398 | } |
| 11394 | 11399 | ||
| 11395 | 11400 | ||
| 11401 | /* Dump contents of glyph GLYPH to stderr. ROW and AREA are | ||
| 11402 | the glyph row and area where the glyph comes from. */ | ||
| 11403 | |||
| 11404 | void | ||
| 11405 | dump_glyph (row, glyph, area) | ||
| 11406 | struct glyph_row *row; | ||
| 11407 | struct glyph *glyph; | ||
| 11408 | int area; | ||
| 11409 | { | ||
| 11410 | if (glyph->type == CHAR_GLYPH) | ||
| 11411 | { | ||
| 11412 | fprintf (stderr, | ||
| 11413 | " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", | ||
| 11414 | glyph - row->glyphs[TEXT_AREA], | ||
| 11415 | 'C', | ||
| 11416 | glyph->charpos, | ||
| 11417 | (BUFFERP (glyph->object) | ||
| 11418 | ? 'B' | ||
| 11419 | : (STRINGP (glyph->object) | ||
| 11420 | ? 'S' | ||
| 11421 | : '-')), | ||
| 11422 | glyph->pixel_width, | ||
| 11423 | glyph->u.ch, | ||
| 11424 | (glyph->u.ch < 0x80 && glyph->u.ch >= ' ' | ||
| 11425 | ? glyph->u.ch | ||
| 11426 | : '.'), | ||
| 11427 | glyph->face_id, | ||
| 11428 | glyph->left_box_line_p, | ||
| 11429 | glyph->right_box_line_p); | ||
| 11430 | } | ||
| 11431 | else if (glyph->type == STRETCH_GLYPH) | ||
| 11432 | { | ||
| 11433 | fprintf (stderr, | ||
| 11434 | " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", | ||
| 11435 | glyph - row->glyphs[TEXT_AREA], | ||
| 11436 | 'S', | ||
| 11437 | glyph->charpos, | ||
| 11438 | (BUFFERP (glyph->object) | ||
| 11439 | ? 'B' | ||
| 11440 | : (STRINGP (glyph->object) | ||
| 11441 | ? 'S' | ||
| 11442 | : '-')), | ||
| 11443 | glyph->pixel_width, | ||
| 11444 | 0, | ||
| 11445 | '.', | ||
| 11446 | glyph->face_id, | ||
| 11447 | glyph->left_box_line_p, | ||
| 11448 | glyph->right_box_line_p); | ||
| 11449 | } | ||
| 11450 | else if (glyph->type == IMAGE_GLYPH) | ||
| 11451 | { | ||
| 11452 | fprintf (stderr, | ||
| 11453 | " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", | ||
| 11454 | glyph - row->glyphs[TEXT_AREA], | ||
| 11455 | 'I', | ||
| 11456 | glyph->charpos, | ||
| 11457 | (BUFFERP (glyph->object) | ||
| 11458 | ? 'B' | ||
| 11459 | : (STRINGP (glyph->object) | ||
| 11460 | ? 'S' | ||
| 11461 | : '-')), | ||
| 11462 | glyph->pixel_width, | ||
| 11463 | glyph->u.img_id, | ||
| 11464 | '.', | ||
| 11465 | glyph->face_id, | ||
| 11466 | glyph->left_box_line_p, | ||
| 11467 | glyph->right_box_line_p); | ||
| 11468 | } | ||
| 11469 | } | ||
| 11470 | |||
| 11471 | |||
| 11396 | /* Dump the contents of glyph row at VPOS in MATRIX to stderr. | 11472 | /* Dump the contents of glyph row at VPOS in MATRIX to stderr. |
| 11397 | GLYPHS 0 means don't show glyph contents. | 11473 | GLYPHS 0 means don't show glyph contents. |
| 11398 | GLYPHS 1 means show glyphs in short form | 11474 | GLYPHS 1 means show glyphs in short form |
| @@ -11453,106 +11529,48 @@ dump_glyph_row (matrix, vpos, glyphs) | |||
| 11453 | 11529 | ||
| 11454 | if (glyphs > 1) | 11530 | if (glyphs > 1) |
| 11455 | { | 11531 | { |
| 11456 | struct glyph *glyph, *glyph_end; | 11532 | int area; |
| 11457 | int prev_had_glyphs_p; | 11533 | |
| 11458 | 11534 | for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) | |
| 11459 | glyph = row->glyphs[TEXT_AREA]; | 11535 | { |
| 11460 | glyph_end = glyph + row->used[TEXT_AREA]; | 11536 | struct glyph *glyph, *glyph_end; |
| 11537 | glyph = row->glyphs[area]; | ||
| 11538 | glyph_end = glyph + row->used[area]; | ||
| 11461 | 11539 | ||
| 11462 | /* Glyph for a line end in text. */ | 11540 | /* Glyph for a line end in text. */ |
| 11463 | if (glyph == glyph_end && glyph->charpos > 0) | 11541 | if (glyph == glyph_end && glyph->charpos > 0) |
| 11464 | ++glyph_end; | 11542 | ++glyph_end; |
| 11465 | 11543 | ||
| 11466 | if (glyph < glyph_end) | 11544 | if (glyph < glyph_end) |
| 11467 | { | 11545 | fprintf (stderr, " Glyph Type Pos O W Code C Face LR\n"); |
| 11468 | fprintf (stderr, " Glyph Type Pos O W Code C Face LR\n"); | ||
| 11469 | prev_had_glyphs_p = 1; | ||
| 11470 | } | ||
| 11471 | else | ||
| 11472 | prev_had_glyphs_p = 0; | ||
| 11473 | 11546 | ||
| 11474 | while (glyph < glyph_end) | 11547 | for (; glyph < glyph_end; ++glyph) |
| 11475 | { | 11548 | dump_glyph (row, glyph, area); |
| 11476 | if (glyph->type == CHAR_GLYPH) | ||
| 11477 | { | ||
| 11478 | fprintf (stderr, | ||
| 11479 | " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", | ||
| 11480 | glyph - row->glyphs[TEXT_AREA], | ||
| 11481 | 'C', | ||
| 11482 | glyph->charpos, | ||
| 11483 | (BUFFERP (glyph->object) | ||
| 11484 | ? 'B' | ||
| 11485 | : (STRINGP (glyph->object) | ||
| 11486 | ? 'S' | ||
| 11487 | : '-')), | ||
| 11488 | glyph->pixel_width, | ||
| 11489 | glyph->u.ch, | ||
| 11490 | (glyph->u.ch < 0x80 && glyph->u.ch >= ' ' | ||
| 11491 | ? glyph->u.ch | ||
| 11492 | : '.'), | ||
| 11493 | glyph->face_id, | ||
| 11494 | glyph->left_box_line_p, | ||
| 11495 | glyph->right_box_line_p); | ||
| 11496 | } | ||
| 11497 | else if (glyph->type == STRETCH_GLYPH) | ||
| 11498 | { | ||
| 11499 | fprintf (stderr, | ||
| 11500 | " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", | ||
| 11501 | glyph - row->glyphs[TEXT_AREA], | ||
| 11502 | 'S', | ||
| 11503 | glyph->charpos, | ||
| 11504 | (BUFFERP (glyph->object) | ||
| 11505 | ? 'B' | ||
| 11506 | : (STRINGP (glyph->object) | ||
| 11507 | ? 'S' | ||
| 11508 | : '-')), | ||
| 11509 | glyph->pixel_width, | ||
| 11510 | 0, | ||
| 11511 | '.', | ||
| 11512 | glyph->face_id, | ||
| 11513 | glyph->left_box_line_p, | ||
| 11514 | glyph->right_box_line_p); | ||
| 11515 | } | ||
| 11516 | else if (glyph->type == IMAGE_GLYPH) | ||
| 11517 | { | ||
| 11518 | fprintf (stderr, | ||
| 11519 | " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", | ||
| 11520 | glyph - row->glyphs[TEXT_AREA], | ||
| 11521 | 'I', | ||
| 11522 | glyph->charpos, | ||
| 11523 | (BUFFERP (glyph->object) | ||
| 11524 | ? 'B' | ||
| 11525 | : (STRINGP (glyph->object) | ||
| 11526 | ? 'S' | ||
| 11527 | : '-')), | ||
| 11528 | glyph->pixel_width, | ||
| 11529 | glyph->u.img_id, | ||
| 11530 | '.', | ||
| 11531 | glyph->face_id, | ||
| 11532 | glyph->left_box_line_p, | ||
| 11533 | glyph->right_box_line_p); | ||
| 11534 | } | ||
| 11535 | ++glyph; | ||
| 11536 | } | 11549 | } |
| 11537 | } | 11550 | } |
| 11538 | else if (glyphs == 1) | 11551 | else if (glyphs == 1) |
| 11539 | { | 11552 | { |
| 11540 | char *s = (char *) alloca (row->used[TEXT_AREA] + 1); | 11553 | int area; |
| 11541 | int i; | ||
| 11542 | 11554 | ||
| 11543 | for (i = 0; i < row->used[TEXT_AREA]; ++i) | 11555 | for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) |
| 11544 | { | 11556 | { |
| 11545 | struct glyph *glyph = row->glyphs[TEXT_AREA] + i; | 11557 | char *s = (char *) alloca (row->used[area] + 1); |
| 11546 | if (glyph->type == CHAR_GLYPH | 11558 | int i; |
| 11547 | && glyph->u.ch < 0x80 | 11559 | |
| 11548 | && glyph->u.ch >= ' ') | 11560 | for (i = 0; i < row->used[area]; ++i) |
| 11549 | s[i] = glyph->u.ch; | 11561 | { |
| 11550 | else | 11562 | struct glyph *glyph = row->glyphs[area] + i; |
| 11551 | s[i] = '.'; | 11563 | if (glyph->type == CHAR_GLYPH |
| 11552 | } | 11564 | && glyph->u.ch < 0x80 |
| 11565 | && glyph->u.ch >= ' ') | ||
| 11566 | s[i] = glyph->u.ch; | ||
| 11567 | else | ||
| 11568 | s[i] = '.'; | ||
| 11569 | } | ||
| 11553 | 11570 | ||
| 11554 | s[i] = '\0'; | 11571 | s[i] = '\0'; |
| 11555 | fprintf (stderr, "%3d: (%d) '%s'\n", vpos, row->enabled_p, s); | 11572 | fprintf (stderr, "%3d: (%d) '%s'\n", vpos, row->enabled_p, s); |
| 11573 | } | ||
| 11556 | } | 11574 | } |
| 11557 | } | 11575 | } |
| 11558 | 11576 | ||