]> git.eshelyaron.com Git - emacs.git/commitdiff
upstream
authorJoakim Verona <joakim@verona.se>
Mon, 18 Jun 2012 13:46:35 +0000 (15:46 +0200)
committerJoakim Verona <joakim@verona.se>
Mon, 18 Jun 2012 13:46:35 +0000 (15:46 +0200)
12 files changed:
1  2  3 
autogen/configure
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/cl.el
src/dispextern.h
src/dispnew.c
src/emacs.c
src/keyboard.c
src/lisp.h
src/print.c
src/window.c
src/xdisp.c
src/xterm.c

Simple merge
Simple merge
index d41b72f20d454136b9593750249121600e2a11d7,d41b72f20d454136b9593750249121600e2a11d7,d41b72f20d454136b9593750249121600e2a11d7..508deed333e3daeb953e2d713dc5695fe3514ee8
@@@@ -4,7 -4,7 -4,7 +4,7 @@@@
   
   ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
   ;; Keywords: extensions
---
+++;; Version: 2.02
   ;; This file is part of GNU Emacs.
   
   ;; GNU Emacs is free software: you can redistribute it and/or modify
Simple merge
diff --cc src/dispnew.c
Simple merge
diff --cc src/emacs.c
Simple merge
diff --cc src/keyboard.c
Simple merge
diff --cc src/lisp.h
Simple merge
diff --cc src/print.c
Simple merge
diff --cc src/window.c
Simple merge
diff --cc src/xdisp.c
Simple merge
diff --cc src/xterm.c
index 442b6b1b934a1768fe0b6222ad1872555aa1e6d1,3c7a7efdd712c26e4572e711d0f8c7012c231b42,fec661625f2bd65e163f0f02d018d5389ad83353..17279f2e6ca0190616d38aefe22e3e81f66f95fd
@@@@ -2774,68 -2765,68 -2827,83 +2836,83 @@@@ x_draw_glyph_string (struct glyph_strin
       {
         /* Draw underline.  */
         if (s->face->underline_p)
--      {
--        unsigned long thickness, position;
--        int y;
-- 
--        if (s->prev && s->prev->face->underline_p)
--          {
--            /* We use the same underline style as the previous one.  */
--            thickness = s->prev->underline_thickness;
--            position = s->prev->underline_position;
--          }
--        else
--          {
--            /* Get the underline thickness.  Default is 1 pixel.  */
--            if (s->font && s->font->underline_thickness > 0)
--              thickness = s->font->underline_thickness;
--            else
--              thickness = 1;
--            if (x_underline_at_descent_line)
--              position = (s->height - thickness) - (s->ybase - s->y);
--            else
--              {
--                /* Get the underline position.  This is the recommended
--                   vertical offset in pixels from the baseline to the top of
--                   the underline.  This is a signed value according to the
--                   specs, and its default is
-- 
--                   ROUND ((maximum descent) / 2), with
--                   ROUND(x) = floor (x + 0.5)  */
-- 
--                if (x_use_underline_position_properties
--                    && s->font && s->font->underline_position >= 0)
--                  position = s->font->underline_position;
--                else if (s->font)
--                  position = (s->font->descent + 1) / 2;
--                else
--                  position = underline_minimum_offset;
--              }
--            position = max (position, underline_minimum_offset);
--          }
--        /* Check the sanity of thickness and position.  We should
--           avoid drawing underline out of the current line area.  */
--        if (s->y + s->height <= s->ybase + position)
--          position = (s->height - 1) - (s->ybase - s->y);
--        if (s->y + s->height < s->ybase + position + thickness)
--          thickness = (s->y + s->height) - (s->ybase + position);
--        s->underline_thickness = thickness;
--        s->underline_position = position;
--        y = s->ybase + position;
--        if (s->face->underline_defaulted_p)
--          XFillRectangle (s->display, s->window, s->gc,
--                          s->x, y, s->width, thickness);
--        else
--          {
--            XGCValues xgcv;
--            XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
--            XSetForeground (s->display, s->gc, s->face->underline_color);
--            XFillRectangle (s->display, s->window, s->gc,
--                            s->x, y, s->width, thickness);
--            XSetForeground (s->display, s->gc, xgcv.foreground);
--          }
--      }
-  
++         {
++           if (s->face->underline_type == FACE_UNDER_WAVE)
++             {
++               if (s->face->underline_defaulted_p)
++                 x_draw_underwave (s);
++               else
++                 {
++                   XGCValues xgcv;
++                   XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
++                   XSetForeground (s->display, s->gc, s->face->underline_color);
++                   x_draw_underwave (s);
++                   XSetForeground (s->display, s->gc, xgcv.foreground);
++                 }
++             }
++           else if (s->face->underline_type == FACE_UNDER_LINE)
++             {
++               unsigned long thickness, position;
++               int y;
+  
++               if (s->prev && s->prev->face->underline_p)
++                 {
++                   /* We use the same underline style as the previous one.  */
++                   thickness = s->prev->underline_thickness;
++                   position = s->prev->underline_position;
++                 }
++               else
++                 {
++                   /* Get the underline thickness.  Default is 1 pixel.  */
++                   if (s->font && s->font->underline_thickness > 0)
++                     thickness = s->font->underline_thickness;
++                   else
++                     thickness = 1;
++                   if (x_underline_at_descent_line)
++                     position = (s->height - thickness) - (s->ybase - s->y);
++                   else
++                     {
++                       /* Get the underline position.  This is the recommended
++                          vertical offset in pixels from the baseline to the top of
++                          the underline.  This is a signed value according to the
++                          specs, and its default is
++ 
++                          ROUND ((maximum descent) / 2), with
++                          ROUND(x) = floor (x + 0.5)  */
++ 
++                       if (x_use_underline_position_properties
++                           && s->font && s->font->underline_position >= 0)
++                         position = s->font->underline_position;
++                       else if (s->font)
++                         position = (s->font->descent + 1) / 2;
++                       else
++                         position = underline_minimum_offset;
++                     }
++                   position = max (position, underline_minimum_offset);
++                 }
++               /* Check the sanity of thickness and position.  We should
++                  avoid drawing underline out of the current line area.  */
++               if (s->y + s->height <= s->ybase + position)
++                 position = (s->height - 1) - (s->ybase - s->y);
++               if (s->y + s->height < s->ybase + position + thickness)
++                 thickness = (s->y + s->height) - (s->ybase + position);
++               s->underline_thickness = thickness;
++               s->underline_position = position;
++               y = s->ybase + position;
++               if (s->face->underline_defaulted_p)
++                 XFillRectangle (s->display, s->window, s->gc,
++                                 s->x, y, s->width, thickness);
++               else
++                 {
++                   XGCValues xgcv;
++                   XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
++                   XSetForeground (s->display, s->gc, s->face->underline_color);
++                   XFillRectangle (s->display, s->window, s->gc,
++                                   s->x, y, s->width, thickness);
++                   XSetForeground (s->display, s->gc, xgcv.foreground);
++                 }
++             }
++         }
         /* Draw overline.  */
         if (s->face->overline_p)
        {