diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2011-02-01 03:54:46 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2011-02-01 03:54:46 +0000 |
commit | abb97fbbedcd84a13bae7b7b70251514bf97cdbb (patch) | |
tree | 632dd80df206c85a4a3654782f2d7b9cd495e3c7 /lisp/gnus/shr.el | |
parent | 8c9da040de3b584cca9a41292d7a8b34818ae21a (diff) | |
download | emacs-abb97fbbedcd84a13bae7b7b70251514bf97cdbb.tar.gz emacs-abb97fbbedcd84a13bae7b7b70251514bf97cdbb.tar.bz2 emacs-abb97fbbedcd84a13bae7b7b70251514bf97cdbb.zip |
shr.el (shr-render-td): Only do colours at the final rendering. Should be slightly faster.
(shr-insert-table): Fix up TD background colours when doing the vertical padding.
gnus-art.el (article-update-date-lapsed): Don't use current-column to find the horizontal position. It's fragile in the presence of \003 characters.
Diffstat (limited to 'lisp/gnus/shr.el')
-rw-r--r-- | lisp/gnus/shr.el | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index f3c75ccd6a3..10e04a87d93 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -1055,8 +1055,11 @@ ones, in case fg and bg are nil." ;; possibly. (dotimes (i (- height (length lines))) (end-of-line) - (insert (make-string (string-width (car lines)) ? ) - shr-table-vertical-line) + (let ((start (point))) + (insert (make-string (string-width (car lines)) ? ) + shr-table-vertical-line) + (when (nth 4 column) + (shr-put-color start (1- (point)) :background (nth 4 column)))) (forward-line 1))))) (shr-insert-table-ruler widths))) @@ -1173,17 +1176,18 @@ 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)) (split-string (buffer-string) "\n") - (shr-collect-overlays)) + (shr-collect-overlays) + (cdr (assq 'background-color shr-stylesheet))) (list max (shr-natural-width))))))) |