shr: add tag font
authorJulien Danjou <julien@danjou.info>
Mon, 22 Nov 2010 15:21:23 +0000 (16:21 +0100)
committerJulien Danjou <julien@danjou.info>
Mon, 22 Nov 2010 15:21:23 +0000 (16:21 +0100)
Signed-off-by: Julien Danjou <julien@danjou.info>
lisp/ChangeLog
lisp/shr.el

index db25fcd..ffce470 100644 (file)
@@ -1,5 +1,7 @@
 2010-11-22  Julien Danjou  <julien@danjou.info>
 
+       * shr.el (shr-tag-font): Add.
+
        * shr-color.el: New file.
 
        * color-lab.el: New file.
index f0f0448..0b3e1a9 100644 (file)
@@ -525,6 +525,14 @@ START, and END."
       (let ((overlay (make-overlay start (point))))
        (overlay-put overlay 'face (cons 'foreground-color color))))))
 
+(defun shr-tag-font (cont)
+  (let ((start (point))
+        (color (cdr (assq :color 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))