# HG changeset patch # User Miles Bader # Date 1212793670 0 # Node ID 4ad2aacd19df6843711c6c7cf76670e200cf0433 # Parent cb95dadcb2ded0b2575fa8bd5ebae48d4159b8cc Calculate tab width based on current face, not global default Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1217 diff -r cb95dadcb2de -r 4ad2aacd19df src/ChangeLog --- a/src/ChangeLog Fri Jun 06 22:53:14 2008 +0000 +++ b/src/ChangeLog Fri Jun 06 23:07:50 2008 +0000 @@ -1,3 +1,8 @@ +2008-06-06 Miles Bader + + * xdisp.c (x_produce_glyphs): Calculate tab width based on current + face, not frame default. + 2008-06-05 Martin Rudalics * window.c (pop_up_windows, pop_up_frames) diff -r cb95dadcb2de -r 4ad2aacd19df src/xdisp.c --- a/src/xdisp.c Fri Jun 06 22:53:14 2008 +0000 +++ b/src/xdisp.c Fri Jun 06 23:07:50 2008 +0000 @@ -20980,14 +20980,14 @@ } else if (it->char_to_display == '\t') { - int tab_width = it->tab_width * FRAME_SPACE_WIDTH (it->f); + int tab_width = it->tab_width * font->space_width; int x = it->current_x + it->continuation_lines_width; int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width; /* If the distance from the current position to the next tab stop is less than a space character width, use the tab stop after that. */ - if (next_tab_x - x < FRAME_SPACE_WIDTH (it->f)) + if (next_tab_x - x < font->space_width) next_tab_x += tab_width; it->pixel_width = next_tab_x - x;