summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2013-06-18 10:46:53 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2013-06-18 10:46:53 +0000
commitf462d10ac4f144ccd0833b4e745f7f51aa3eb1bb (patch)
tree7958b334f64910be5fa742a076bbda83ce875644
parentdb5a34cae7ead2df3515f939b6cd6f1c1f889c2e (diff)
Don't colourise images from tables
* shr.el (shr-tag-table): Insert the images after the table, so that they're not covered by the table coulorisation, which often looked awkward.
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/shr.el16
2 files changed, 14 insertions, 8 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index c96702260f..8718b9d4ca 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * shr.el (shr-tag-table): Insert the images after the table, so that
+ they're not covered by the table colourisation, which often looked
+ awkward.
+
2013-06-18 Katsumi Yamaoka <yamaoka@jpl.org>
* eww.el (eww-detect-charset): Improve regexp; move backward.
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index 06abde9e38..1c940bebc5 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -1248,13 +1248,7 @@ ones, in case fg and bg are nil."
(frame-width))
(setq truncate-lines t))
;; Then render the table again with these new "hard" widths.
- (shr-insert-table (shr-make-table cont sketch-widths t) sketch-widths))
- ;; Finally, insert all the images after the table. The Emacs buffer
- ;; model isn't strong enough to allow us to put the images actually
- ;; into the tables.
- (when (zerop shr-table-depth)
- (dolist (elem (shr-find-elements cont 'img))
- (shr-tag-img (cdr elem)))))
+ (shr-insert-table (shr-make-table cont sketch-widths t) sketch-widths)))
(defun shr-tag-table (cont)
(shr-ensure-paragraph)
@@ -1318,7 +1312,13 @@ ones, in case fg and bg are nil."
body))))))
(when bgcolor
(shr-colorize-region start (point) (cdr (assq 'color shr-stylesheet))
- bgcolor))))
+ bgcolor))
+ ;; Finally, insert all the images after the table. The Emacs buffer
+ ;; model isn't strong enough to allow us to put the images actually
+ ;; into the tables.
+ (when (zerop shr-table-depth)
+ (dolist (elem (shr-find-elements cont 'img))
+ (shr-tag-img (cdr elem))))))
(defun shr-find-elements (cont type)
(let (result)