aboutsummaryrefslogtreecommitdiffstats
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorJoakim Verona2012-03-25 22:04:52 +0200
committerJoakim Verona2012-03-25 22:04:52 +0200
commit75da28a3845b9dfa4e730cfa19c14edc52cbb222 (patch)
treeb04519bffcb21264cbe3ce8af13df7186548667f /src/xdisp.c
parentb827329a89291ed68dd017c53976be7ce5ed3b22 (diff)
parentf514f6f0e3f8bbeb5212d0337e5bda5a9a4eaeb5 (diff)
downloademacs-75da28a3845b9dfa4e730cfa19c14edc52cbb222.tar.gz
emacs-75da28a3845b9dfa4e730cfa19c14edc52cbb222.zip
upstream
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index da2b78f67e3..b567893d719 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3678,7 +3678,9 @@ handle_face_prop (struct it *it)
3678 with, so that overlay strings appear in the same face as 3678 with, so that overlay strings appear in the same face as
3679 surrounding text, unless they specify their own 3679 surrounding text, unless they specify their own
3680 faces. */ 3680 faces. */
3681 base_face_id = underlying_face_id (it); 3681 base_face_id = it->string_from_prefix_prop_p
3682 ? DEFAULT_FACE_ID
3683 : underlying_face_id (it);
3682 } 3684 }
3683 3685
3684 new_face_id = face_at_string_position (it->w, 3686 new_face_id = face_at_string_position (it->w,
@@ -5606,6 +5608,7 @@ push_it (struct it *it, struct text_pos *position)
5606 p->font_height = it->font_height; 5608 p->font_height = it->font_height;
5607 p->voffset = it->voffset; 5609 p->voffset = it->voffset;
5608 p->string_from_display_prop_p = it->string_from_display_prop_p; 5610 p->string_from_display_prop_p = it->string_from_display_prop_p;
5611 p->string_from_prefix_prop_p = it->string_from_prefix_prop_p;
5609 p->display_ellipsis_p = 0; 5612 p->display_ellipsis_p = 0;
5610 p->line_wrap = it->line_wrap; 5613 p->line_wrap = it->line_wrap;
5611 p->bidi_p = it->bidi_p; 5614 p->bidi_p = it->bidi_p;
@@ -5720,6 +5723,7 @@ pop_it (struct it *it)
5720 it->font_height = p->font_height; 5723 it->font_height = p->font_height;
5721 it->voffset = p->voffset; 5724 it->voffset = p->voffset;
5722 it->string_from_display_prop_p = p->string_from_display_prop_p; 5725 it->string_from_display_prop_p = p->string_from_display_prop_p;
5726 it->string_from_prefix_prop_p = p->string_from_prefix_prop_p;
5723 it->line_wrap = p->line_wrap; 5727 it->line_wrap = p->line_wrap;
5724 it->bidi_p = p->bidi_p; 5728 it->bidi_p = p->bidi_p;
5725 it->paragraph_embedding = p->paragraph_embedding; 5729 it->paragraph_embedding = p->paragraph_embedding;
@@ -6150,6 +6154,8 @@ reseat_1 (struct it *it, struct text_pos pos, int set_stop_p)
6150 it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); 6154 it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters));
6151 it->sp = 0; 6155 it->sp = 0;
6152 it->string_from_display_prop_p = 0; 6156 it->string_from_display_prop_p = 0;
6157 it->string_from_prefix_prop_p = 0;
6158
6153 it->from_disp_prop_p = 0; 6159 it->from_disp_prop_p = 0;
6154 it->face_before_selective_p = 0; 6160 it->face_before_selective_p = 0;
6155 if (it->bidi_p) 6161 if (it->bidi_p)
@@ -18644,7 +18650,7 @@ cursor_row_p (struct glyph_row *row)
18644 `line-prefix' and `wrap-prefix' properties. */ 18650 `line-prefix' and `wrap-prefix' properties. */
18645 18651
18646static int 18652static int
18647push_display_prop (struct it *it, Lisp_Object prop) 18653push_prefix_prop (struct it *it, Lisp_Object prop)
18648{ 18654{
18649 struct text_pos pos = 18655 struct text_pos pos =
18650 STRINGP (it->string) ? it->current.string_pos : it->current.pos; 18656 STRINGP (it->string) ? it->current.string_pos : it->current.pos;
@@ -18668,6 +18674,7 @@ push_display_prop (struct it *it, Lisp_Object prop)
18668 } 18674 }
18669 18675
18670 it->string = prop; 18676 it->string = prop;
18677 it->string_from_prefix_prop_p = 1;
18671 it->multibyte_p = STRING_MULTIBYTE (it->string); 18678 it->multibyte_p = STRING_MULTIBYTE (it->string);
18672 it->current.overlay_string_index = -1; 18679 it->current.overlay_string_index = -1;
18673 IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; 18680 IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0;
@@ -18754,7 +18761,7 @@ handle_line_prefix (struct it *it)
18754 if (NILP (prefix)) 18761 if (NILP (prefix))
18755 prefix = Vline_prefix; 18762 prefix = Vline_prefix;
18756 } 18763 }
18757 if (! NILP (prefix) && push_display_prop (it, prefix)) 18764 if (! NILP (prefix) && push_prefix_prop (it, prefix))
18758 { 18765 {
18759 /* If the prefix is wider than the window, and we try to wrap 18766 /* If the prefix is wider than the window, and we try to wrap
18760 it, it would acquire its own wrap prefix, and so on till the 18767 it, it would acquire its own wrap prefix, and so on till the
@@ -24234,7 +24241,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
24234 sprintf (buf, "%0*X", it->c < 0x10000 ? 4 : 6, it->c); 24241 sprintf (buf, "%0*X", it->c < 0x10000 ? 4 : 6, it->c);
24235 str = buf; 24242 str = buf;
24236 } 24243 }
24237 for (len = 0; str[len] && ASCII_BYTE_P (str[len]); len++) 24244 for (len = 0; str[len] && ASCII_BYTE_P (str[len]) && len < 6; len++)
24238 code[len] = font->driver->encode_char (font, str[len]); 24245 code[len] = font->driver->encode_char (font, str[len]);
24239 upper_len = (len + 1) / 2; 24246 upper_len = (len + 1) / 2;
24240 font->driver->text_extents (font, code, upper_len, 24247 font->driver->text_extents (font, code, upper_len,