]> git.eshelyaron.com Git - emacs.git/commitdiff
Calculate tab width based on current face, not global default
authorMiles Bader <miles@gnu.org>
Fri, 6 Jun 2008 23:07:50 +0000 (23:07 +0000)
committerMiles Bader <miles@gnu.org>
Fri, 6 Jun 2008 23:07:50 +0000 (23:07 +0000)
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1217

src/ChangeLog
src/xdisp.c

index d04d1b81c33caa60d1f69730fbe059f12a30232f..6ae6e4fc1465bdb870b398d9c331b57a7b562ba5 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-06  Miles Bader  <miles@gnu.org>
+
+       * xdisp.c (x_produce_glyphs): Calculate tab width based on current
+       face, not frame default.
+
 2008-06-05  Martin Rudalics  <rudalics@gmx.at>
 
        * window.c (pop_up_windows, pop_up_frames)
index 56db272dcb046de4fe013c927f575e84a8327afa..b248cba8e9d8cffb24aecd5c5c2f35983c97d84f 100644 (file)
@@ -20980,14 +20980,14 @@ x_produce_glyphs (it)
        }
       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;