diff options
Diffstat (limited to 'lisp/gnus/shr.el')
-rw-r--r-- | lisp/gnus/shr.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 10e04a87d93..5b4e6c7389d 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -601,7 +601,8 @@ ones, in case fg and bg are nil." (when fg (shr-put-color start end :foreground (cadr new-colors))) (when bg - (shr-put-color start end :background (car new-colors))))))) + (shr-put-color start end :background (car new-colors)))) + new-colors))) ;; Put a color in the region, but avoid putting colors on on blank ;; text at the start of the line, and the newline at the end, to avoid @@ -1126,7 +1127,7 @@ ones, in case fg and bg are nil." (fgcolor (cdr (assq :fgcolor cont))) (style (cdr (assq :style cont))) (shr-stylesheet shr-stylesheet) - overlays) + overlays actual-colors) (when style (setq style (and (string-match "color" style) (shr-parse-style style)))) @@ -1178,16 +1179,17 @@ ones, in case fg and bg are nil." (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))))) + (setq actual-colors + (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) - (cdr (assq 'background-color shr-stylesheet))) + (car actual-colors)) (list max (shr-natural-width))))))) |