(shr-render-td): Only do colours at the final rendering.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 1 Feb 2011 02:51:24 +0000 (18:51 -0800)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 1 Feb 2011 02:51:24 +0000 (18:51 -0800)
Should be slightly faster.

lisp/ChangeLog
lisp/shr.el

index 3414778..b74c99a 100644 (file)
@@ -1,5 +1,8 @@
 2011-02-01  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * shr.el (shr-render-td): Only do colours at the final rendering.
+       Should be slightly faster.
+
        * gnus-art.el (article-date-ut): Protect against articles with no Date
        header.
        (article-update-date-lapsed): Don't use current-column to find the
index f3c75cc..715c220 100644 (file)
@@ -1173,12 +1173,12 @@ ones, in case fg and bg are nil."
              (end-of-line)
              (when (> (- width (current-column)) 0)
                (insert (make-string (- width (current-column)) ? )))
-             (forward-line 1))))
-       (when style
-         (shr-colorize-region
-          (point-min) (point-max)
-          (cdr (assq 'color shr-stylesheet))
-          (cdr (assq 'background-color shr-stylesheet))))
+             (forward-line 1)))
+         (when style
+           (shr-colorize-region
+            (point-min) (point-max)
+            (cdr (assq 'color shr-stylesheet))
+            (cdr (assq 'background-color shr-stylesheet)))))
        (if fill
            (list max
                  (count-lines (point-min) (point-max))