Revert "Drop colorisation of regions since we don't control the background color."
authorJulien Danjou <julien@danjou.info>
Mon, 22 Nov 2010 15:14:32 +0000 (16:14 +0100)
committerJulien Danjou <julien@danjou.info>
Mon, 22 Nov 2010 15:14:32 +0000 (16:14 +0100)
This reverts commit d8acad365dfc0953767c66b2fe3fefdc1bcca884.

Conflicts:

lisp/ChangeLog

lisp/ChangeLog
lisp/shr.el

index 60178ee..db25fcd 100644 (file)
 
 2010-10-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * shr.el (shr-tag-span): Drop colorisation of regions since we don't
-       control the background color.
-       (shr-tag-img): Ignore very small web bug type images.
+       * shr.el (shr-tag-img): Ignore very small web bug type images.
        (shr-put-image): Add help-echo alt texts to the images.
        (shr-tag-video): Show the video poster image.
 
index 6e5800a..f0f0448 100644 (file)
@@ -517,6 +517,14 @@ START, and END."
 (defun shr-tag-s (cont)
   (shr-fontize-cont cont 'strike-through))
 
+(defun shr-tag-span (cont)
+  (let ((start (point))
+       (color (cdr (assq 'color (shr-parse-style (cdr (assq :style cont)))))))
+    (shr-generic cont)
+    (when color
+      (let ((overlay (make-overlay start (point))))
+       (overlay-put overlay 'face (cons 'foreground-color color))))))
+
 (defun shr-parse-style (style)
   (when style
     (let ((plist nil))