From: Joakim Verona Date: Mon, 18 Jun 2012 13:46:35 +0000 (+0200) Subject: upstream X-Git-Tag: emacs-25.0.90~3303 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=32d8ff0e7c43e0174943731690db1ad30ae1a538;p=emacs.git upstream --- 32d8ff0e7c43e0174943731690db1ad30ae1a538 diff --cc lisp/emacs-lisp/cl.el index d41b72f20d4,d41b72f20d4,d41b72f20d4..508deed333e --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@@@ -4,7 -4,7 -4,7 +4,7 @@@@ ;; Author: Stefan Monnier ;; Keywords: extensions --- +++;; Version: 2.02 ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify diff --cc src/xterm.c index 442b6b1b934,3c7a7efdd71,fec661625f2..17279f2e6ca --- a/src/xterm.c +++ b/src/xterm.c @@@@ -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) {